Open fossum opened 3 years ago
Seems that compiling in 64-bit doesn't help. The below commands produce the same result.
rm -r ./*
cmake .. -DBUILD_PYTHON_BINDINGS=ON -DPYTHON_EXECUTABLE='C:\Program Files\Python39\python.exe'
cmake --build .
I have exactly the same issue : 'error LNK2019' when building the solution in visual studio 2019
Fixed it by adding these 2 lines at the top of .\pyiec61850\CMakeLists.txt :
cmake_policy(SET CMP0078 OLD)
cmake_policy(SET CMP0086 OLD)
One thing I failed to mention: I do have to clean the build folder for it to work 100% of the time. Didn't have to do that with Visual Studio 2017. Also, I don't understand why setting the policies helps, because it's supposed to default to OLD.
I tried with the policy settings from @rochjp. No luck. Still sticking with v1.4 for the time being.
Wait a minute.. Turns out that I had just misplaced the "WinPcap Developer's Pack".
So for anyone looking into this, make sure you have installed the WinPcap third party files as instructed in the README.md. It turns out that v1.5 of libiec61850 introduces goose bindings to the swig interface which means that the shared library now needs to be build with the GOOSE enabled. (It could be nice to have CMakeFiles.txt do some check)
In earlier versions the python bindings may have worked even without wpcap since there was no goose functionality included in the swig interface.. I'll have to keep testing some more. But maybe this v1.5 upgrade isn't such a lost cause after all.
I've successfully compiled 1.5 without Python bindings, but I need them. The Python compile seems to be missing a lot of references. Any idea what might have caused this? Could it be the 32-bit python? Or a Windows specific issue?
Setup:
Steps (Powershell):
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A Win32 -S .. -B "build32" -DBUILD_PYTHON_BINDINGS=ON
cmake --build build32 --config Release
Output: