Last active
June 24, 2019 13:41
-
-
Save eriktonon/b8e8f69c7c00e9eef3dfaedd3085e293 to your computer and use it in GitHub Desktop.
Dlib script windows use cuda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/davisking/dlib.git | |
cd dlib | |
mkdir build | |
cd build | |
cmake -G "Visual Studio 15 2017 Win64" -T host=x64 .. -DDLIB_USE_CUDA=1 -DUSE_AVX_INSTRUCTIONS=1 ` | |
-DJPEG_INCLUDE_DIR=..\dlib\external\libjpeg ` | |
-DJPEG_LIBRARY=..\dlib\external\libjpeg ` | |
-DPNG_PNG_INCLUDE_DIR=..\dlib\external\libpng ` | |
-DPNG_LIBRARY_RELEASE=..\dlib\external\libpng ` | |
-DZLIB_INCLUDE_DIR=..\dlib\external\zlib ` | |
-DZLIB_LIBRARY_RELEASE=..\dlib\external\zlib ` | |
-DCMAKE_INSTALL_PREFIX=install .. | |
cmake --build . --config Release --target INSTALL | |
------------------------------------------------------------- | |
Removed line in code | |
You don't need to run cmake at all. Running that doesn't do anything related to using dlib via python. | |
I note that the output says 4>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library [F:\Proj ects\python\dlib\build\temp.win-amd64-3.6\Release\dlib_python.vcxproj] | |
Maybe remove this line: https://github.com/davisking/dlib/blob/master/tools/python/CMakeLists.txt#L23 and see what happens. Although really it shouldn't matter. | |
The real issue is probably that the version of libjpeg cmake found (that jpeg.lib file) is probably compiled in some bad way, since it's missing symbols. You can see https://github.com/davisking/dlib/blob/master/dlib/CMakeLists.txt#L487 that there are already checks to avoid linking against the, generally broken, copy of libjpeg included in anaconda. Maybe they should be expanded to avoid linking to whatever funky libjpeg is on your system. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment