Skip to content

Build davisking.dlib failed, not exist zlib.h and mex.h #78

@z-pc

Description

@z-pc

Describe the bug
I add "org.sw.demo.davisking.dlib", the compiler (VS2019 16.10.1) not found "zlib.h " and "mex.h"
This's some last error lines:

1>[148/3934] [org.sw.demo.davisking.dlib-19.17.0]/dlib/test/probabilistic.cpp
1>[149/3934] [org.sw.demo.davisking.dlib-19.17.0]/dlib/cmake_utils/test_for_cpp11/cpp11_test.cpp
1>Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.davisking.dlib-19.17.0]/dlib/test/blas_bindings/vector.cpp
1>C:/Users/TuanAnh/.sw/storage/pkg/0a/aa/5e2e/src/sdir/dlib/test/blas_bindings/vector.cpp(9): fatal error C1189: #error:  "BLAS bindings must be used for this test to make any sense"
1>command failed: exit code = 2
1>Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.davisking.dlib-19.17.0]/dlib/external/libpng/pngpread.c
1>C:\Users\TuanAnh\.sw\storage\pkg\0a\aa\5e2e\src\sdir\dlib\external\libpng\pngstruct.h(31): fatal error C1083: Cannot open include file: 'zlib.h': No such file or directory
1>command failed: exit code = 2
1>Exception in file D:/dev/cppan2/client2/src/sw/builder/command.cpp:764, function execute1: When executing: [org.sw.demo.davisking.dlib-19.17.0]/dlib/matlab/example_mex_class.cpp
1>C:\Users\TuanAnh\.sw\storage\pkg\0a\aa\5e2e\src\sdir\dlib\matlab\mex_wrapper.cpp(114): fatal error C1083: Cannot open include file: 'mex.h': No such file or directory
1>command failed: exit code = 2
1>Total errors: 3
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5): error MSB8066: Custom build for 'G:\OCR\OCREngine\buildvs2019\CMakeFiles\cb97bb6989e5eaed4086d4f11b2765ae\sw_build_dependencies.rule' exited with code 1.
1>Done building project "sw_build_dependencies.vcxproj" -- FAILED.

I tried again by "Actions" from website, same error.
Some main lines in CMakeFile:

cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
set(SW_BUILD_SHARED_LIBS 0)
find_package(SW REQUIRED)
sw_add_package(
	${LIBTESSERACT}
	#org.sw.demo.boost.geometry
	org.sw.demo.danbloomberg.leptonica
	org.sw.demo.artifexsoftware.mupdf
	org.sw.demo.davisking.dlib
	)
sw_execute()

add_executable(example_classifier
	example/example_classifier.cpp)

target_link_libraries(example_classifier
	PUBLIC org.sw.demo.davisking.dlib)

Did I miss something?
Thanks.

Information:
"
sw.client.sw version 1.0.0
git revision db82472
assembled on
02.06.2021 21:58:26 UTC
03.06.2021 04:58:26 SE Asia Standard Time
"
VS2019 16.10.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions