ion201 / PyHSCam

MIT License
4 stars 0 forks source link

Compiling with Visual Studio 2019 #2

Open PablitoE opened 3 years ago

PablitoE commented 3 years ago

Hi. I was trying to build the project using Visual Studio 2019 (msvc-16.10) and boost 1.76.0 but I ran into some issues, and now I'm stuck. I was hoping to get some help from you. I followed your installation notes, adapting things to my msvc and boost versions. I was able to compile boost by changing "toolset=msvc-14.0" to "toolset=msvc" in the b2 command (line 3 in Compiling.1 ). Then, I used "bjam --toolset=msvc variant=release link=static", but I get:

######################################################################################## msvc.link.dll bin\msvc-16.10\release\link-static\python-3.7\threading-multi\PyHSCam.pyd LINK : fatal error LNK1104: cannot open file 'libboost_python37-vc142-mt-x64-1_76.lib'

    call "bin\standalone\msvc\msvc-16.10\msvc-setup.bat"  >nul

link /NOLOGO /INCREMENTAL:NO "bin\msvc-16.10\release\link-static\python-3.7\threading-multi\PyHSCam.obj" "lib\PDCLIB.lib" "C:\boost\boost_1_76_0\bin.v2\libs\python\build\msvc-16.10\release\link-static\python-3.7\threading-multi\libboost_python37-vc1610-mt-x64-1_76.lib" "python37.lib" /NOENTRY /MACHINE:X64 /MANIFEST:EMBED /subsystem:console /out:"bin\msvc-16.10\release\link-static\python-3.7\threading-multi\PyHSCam.pyd" /LIBPATH:"C:\Users\HoloICE\anaconda3\envs\gentl_37\libs" /DLL

...failed msvc.link.dll bin\msvc-16.10\release\link-static\python-3.7\threading-multi\PyHSCam.pyd... ...skipped <p.>PyHSCam.pyd for lack of <pbin\msvc-16.10\release\link-static\python-3.7\threading-multi>PyHSCam.pyd... ...failed updating 1 target... ...skipped 1 target... ########################################################################################

Why do you think it is still trying to use libboost_python37-vc142-mt-x64-1_76.lib when actually I have libboost_python37-vc1610-mt-x64-1_76.lib ? Thanks, Pablo

ion201 commented 3 years ago

You are mistaken here:

build the project using Visual Studio 2019 (msvc-16.10)

This is not obvious, but all visual studio releases from 2019 onward (16.X VS release) use MSVC++ 14.2. At a glance, it seems like the proper way to get this number is to create a simple program that prints out _MSC_VER.