[solved] conda: win: build-errors 20191201

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
looo
Posts: 3199
Joined: Mon Nov 11, 2013 5:29 pm

[solved] conda: win: build-errors 20191201

Postby looo » Sun Dec 01, 2019 10:46 am

I encountered some build errors on windows today (commit):

1.

Code: Select all

CMake Error at cMake/FreeCAD_Helpers/SetupPCL.cmake:11 (find_package):
  By not providing "FindPCL.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "PCL", but
  CMake did not find one.

  Could not find a package configuration file provided by "PCL" with any of
  the following names:

    PCLConfig.cmake
    pcl-config.cmake
2. after enabeling pcl:

Code: Select all

cmd.exe /C "cd . && %BUILD_PREFIX%\Library\bin\cmake.exe -E vs_link_dll --intdir=src\App\CMakeFiles\FreeCADApp.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\link.exe /nologo src\App\CMakeFiles\FreeCADApp.dir\Annotation.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Document.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Extension.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectExtension.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ExtensionContainer.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ExtensionContainerPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GroupExtension.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GroupExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectFileIncluded.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectGroup.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectGroupPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GeoFeaturePyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObserver.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObserverPython.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Expression.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\FeaturePython.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\FeatureTest.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GeoFeature.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GeoFeatureGroupExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GeoFeatureGroupExtension.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\OriginGroupExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\OriginGroupExtension.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PartPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Part.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Origin.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Path.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\InventorObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\MeasureDistance.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Placement.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\OriginFeature.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Range.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Transactions.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\TransactionalObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\VRMLObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\MaterialObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\MergeDocuments.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\TextDocument.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Link.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\LinkBaseExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DynamicProperty.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ObjectIdentifier.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Property.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyContainer.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyContainerPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyFile.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyGeo.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyLinks.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyPythonObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyStandard.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyUnits.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyExpressionEngine.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Application.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ApplicationPy.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\AutoTransaction.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Branding.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ColorModel.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ComplexGeoData.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ComplexGeoDataPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Enumeration.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Material.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\MaterialPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PreCompiled.cpp.obj  /out:bin\FreeCADApp.dll /implib:src\App\FreeCADApp.lib /pdb:bin\FreeCADApp.pdb /dll /version:0.0 /machine:x64 /NODEFAULTLIB /INCREMENTAL:NO /DEBUG  src\Base\FreeCADBase.lib %PREFIX%\Library\lib\libboost_filesystem.lib %PREFIX%\Library\lib\libboost_program_options.lib %PREFIX%\Library\lib\libboost_regex.lib %PREFIX%\Library\lib\libboost_system.lib %PREFIX%\Library\lib\libboost_thread.lib -lpthreads %PREFIX%\Library\lib\libboost_chrono.lib %PREFIX%\Library\lib\libboost_date_time.lib %PREFIX%\Library\lib\libboost_atomic.lib %PREFIX%\Library\lib\Qt5Xml_conda.lib %PREFIX%\Library\lib\xerces-c_3.lib %PREFIX%\Library\lib\z.lib MSVCRT.lib MSVCPRT.lib Rpcrt4.lib version.lib vcruntime.lib ucrt.lib concrt.lib %PREFIX%\libs\Python37.lib %PREFIX%\Library\lib\Qt5Core_conda.lib kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib winmm.lib comsupp.lib Ws2_32.lib dbghelp.lib  && cd ."
LINK: command "C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\link.exe /nologo src\App\CMakeFiles\FreeCADApp.dir\Annotation.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Document.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Extension.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectExtension.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ExtensionContainer.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ExtensionContainerPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GroupExtension.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GroupExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectFileIncluded.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectGroup.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectGroupPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GeoFeaturePyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObjectPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObserver.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentObserverPython.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DocumentPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Expression.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\FeaturePython.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\FeatureTest.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GeoFeature.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GeoFeatureGroupExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\GeoFeatureGroupExtension.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\OriginGroupExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\OriginGroupExtension.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PartPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Part.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Origin.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Path.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\InventorObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\MeasureDistance.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Placement.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\OriginFeature.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Range.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Transactions.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\TransactionalObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\VRMLObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\MaterialObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\MergeDocuments.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\TextDocument.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Link.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\LinkBaseExtensionPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\DynamicProperty.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ObjectIdentifier.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Property.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyContainer.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyContainerPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyFile.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyGeo.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyLinks.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyPythonObject.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyStandard.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyUnits.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PropertyExpressionEngine.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Application.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ApplicationPy.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\AutoTransaction.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Branding.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ColorModel.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ComplexGeoData.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\ComplexGeoDataPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Enumeration.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\Material.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\MaterialPyImp.cpp.obj src\App\CMakeFiles\FreeCADApp.dir\PreCompiled.cpp.obj /out:bin\FreeCADApp.dll /implib:src\App\FreeCADApp.lib /pdb:bin\FreeCADApp.pdb /dll /version:0.0 /machine:x64 /NODEFAULTLIB /INCREMENTAL:NO /DEBUG src\Base\FreeCADBase.lib %PREFIX%\Library\lib\libboost_filesystem.lib %PREFIX%\Library\lib\libboost_program_options.lib %PREFIX%\Library\lib\libboost_regex.lib %PREFIX%\Library\lib\libboost_system.lib %PREFIX%\Library\lib\libboost_thread.lib -lpthreads %PREFIX%\Library\lib\libboost_chrono.lib %PREFIX%\Library\lib\libboost_date_time.lib %PREFIX%\Library\lib\libboost_atomic.lib %PREFIX%\Library\lib\Qt5Xml_conda.lib %PREFIX%\Library\lib\xerces-c_3.lib %PREFIX%\Library\lib\z.lib MSVCRT.lib MSVCPRT.lib Rpcrt4.lib version.lib vcruntime.lib ucrt.lib concrt.lib %PREFIX%\libs\Python37.lib %PREFIX%\Library\lib\Qt5Core_conda.lib kernel32.lib user32.lib gdi32.lib winspool.lib SHFolder.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib winmm.lib comsupp.lib Ws2_32.lib dbghelp.lib /MANIFEST /MANIFESTFILE:bin\FreeCADApp.dll.manifest" failed (exit code 1169) with the following output:
LINK : warning LNK4044: unrecognized option '/lpthreads'; ignored
libboost_program_options.lib(value_semantic.obj) : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > boost::program_options::arg" (?arg@program_options@boost@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A) already defined in Application.cpp.obj
libboost_program_options.lib(options_description.obj) : error LNK2005: "public: static unsigned int const boost::program_options::options_description::m_default_line_length" (?m_default_line_length@options_description@program_options@boost@@2IB) already defined in Application.cpp.obj
   Creating library src\App\FreeCADApp.lib and object src\App\FreeCADApp.exp
bin\FreeCADApp.dll : fatal error LNK1169: one or more multiply defined symbols found
Last edited by looo on Fri Dec 06, 2019 7:50 am, edited 1 time in total.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
UR_
Posts: 1177
Joined: Tue Jan 03, 2017 8:42 pm

Re: conda: win: build-errors 20191201

Postby UR_ » Sun Dec 01, 2019 11:47 am

Code: Select all

fatal error LNK1169: one or more multiply defined symbols found
Same linker error as here https://forum.freecadweb.org/viewtopic. ... 99#p349446

I am really unhappy with this "fix" :frowning:
but it's working so far.
User avatar
looo
Posts: 3199
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda: win: build-errors 20191201

Postby looo » Sun Dec 01, 2019 12:17 pm

UR_ wrote:
Sun Dec 01, 2019 11:47 am

Code: Select all

fatal error LNK1169: one or more multiply defined symbols found
Same linker error as here https://forum.freecadweb.org/viewtopic. ... 99#p349446

I am really unhappy with this "fix" :frowning:
but it's working so far.
Ah, you are right, I saw this post already, but was happy to not run into it back then... So this means that azure now uses vs 2019?

Not sure if it's possible to set this flag with cmake. I guess it's better to fix this in the FreeCAD-source. Maybe someone knows what causes the issue.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
sgrogan
Posts: 5651
Joined: Wed Oct 22, 2014 5:02 pm

Re: conda: win: build-errors 20191201

Postby sgrogan » Sun Dec 01, 2019 2:57 pm

looo wrote:
Sun Dec 01, 2019 12:17 pm
Not sure if it's possible to set this flag with cmake. I guess it's better to fix this in the FreeCAD-source. Maybe someone knows what causes the issue.
This commit sets PCL when not using the Libpack git commit ead9c5c on Win
I can still build FreeCAD with PCL off using VS2015 and Conda deps.
I conda installed PCL 1.9 and I can reproduce the error.
For the Libpack based version we also use PCL 1.9 and VS2017 with no problems.
Maybe there is a packaging error for PCL 1.9 on Conda? There is another pinned version that I haven't tested yet. https://anaconda.org/conda-forge/pcl
7ofNine
Posts: 24
Joined: Sat Aug 27, 2016 2:35 pm

Re: conda: win: build-errors 20191201

Postby 7ofNine » Tue Dec 03, 2019 4:28 pm

My two cents.
I am building with libpack 12.1.2_x64_VC15 using VS 2019 16.4.0 preview 6 and don't run into problems of this type.
User avatar
looo
Posts: 3199
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda: win: build-errors 20191201

Postby looo » Tue Dec 03, 2019 5:08 pm

Code: Select all

libboost_program_options.lib(value_semantic.obj) : error LNK2005: "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > boost::program_options::arg" (?arg@program_options@boost@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A) already defined in Application.cpp.obj
To me it sounds like boost::program_options::arg is defined in Application.cpp and somewhere else. But I am not sure if this relates to pcl. c++ guru wanted.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
sgrogan
Posts: 5651
Joined: Wed Oct 22, 2014 5:02 pm

Re: conda: win: build-errors 20191201

Postby sgrogan » Tue Dec 03, 2019 11:56 pm

looo wrote:
Tue Dec 03, 2019 5:08 pm
But I am not sure if this relates to pcl.
For me it's definitely related as I can make the errors come and go by enable/disable pcl.

Your post offers a clue. Discovered by running the cmake-gui.
When using pcl FreeCAD links with libboost_program_options.lib, when not using pcl FreeCAD links against boost_program_options.lib
Maybe the comment at the beginning offers a clue https://github.com/FreeCAD/FreeCAD/blob ... pPCL.cmake
Both files exist in my Conda environment at <PATH to MINICONDA3>/envs/<ENVNAME>/Library/lib, with the same date. The libboost.* files are all larger than the boost.* files.

@UR_, can you post your CMakeCache.txt?
Are you still using Boost_NO_CMAKE ? I am.

EDIT: BTW the Libpack uses Boost 1.67 where the problem doesn't exist. Boost 1.7 (used by Conda) added many CMake changes.
User avatar
sgrogan
Posts: 5651
Joined: Wed Oct 22, 2014 5:02 pm

Re: conda: win: build-errors 20191201

Postby sgrogan » Wed Dec 04, 2019 3:12 am

Maybe you guys can test this https://github.com/FreeCAD/FreeCAD/rele ... nVS2015.7z
I got FreeCAD to CMake config by replacing libboost* with boost* in cmake-gui.
I was then able to BUILD_REVERSEENGINEERING
The self tests pass
User avatar
looo
Posts: 3199
Joined: Mon Nov 11, 2013 5:29 pm

Re: conda: win: build-errors 20191201

Postby looo » Wed Dec 04, 2019 7:26 am

sgrogan wrote:
Tue Dec 03, 2019 11:56 pm
For me it's definitely related as I can make the errors come and go by enable/disable pcl.
One possible issue might be that pcl was configured without the Boost_NO_BOOST_CMAKE option enabled.
https://github.com/conda-forge/pcl-feedstock/pull/18
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
UR_
Posts: 1177
Joined: Tue Jan 03, 2017 8:42 pm

Re: conda: win: build-errors 20191201

Postby UR_ » Wed Dec 04, 2019 8:54 am

sgrogan wrote:
Tue Dec 03, 2019 11:56 pm
Are you still using Boost_NO_CMAKE ?
Just added

Code: Select all

set ENV_PREFIX=%userprofile%\Miniconda3\envs\freecad-dev
set LIBRARY_PREFIX=%ENV_PREFIX%\Library
set CODE_PREFIX=%userprofile%\FreeCADcode

"C:\Program Files\CMake\bin\cmake" ^
      -G "Visual Studio 16 2019" -A x64 ^
      -D Boost_NO_CMAKE=TRUE ^
      -D BUILD_FEM_NETGEN=TRUE ^
      -D BUILD_FLAT_MESH=TRUE ^
      -D BUILD_PLOT=TRUE ^
      -D BUILD_QT5=TRUE ^
      -D BUILD_REVERSEENGINEERING=NO ^
      -D BUILD_WITH_CONDA=TRUE ^
      -D CMAKE_BUILD_TYPE=Release ^
      -D CMAKE_INCLUDE_PATH=%LIBRARY_PREFIX%\include ^
      -D CMAKE_INSTALL_PREFIX=%ENV_PREFIX%\Library ^
      -D CMAKE_LIBRARY_PATH=%LIBRARY_PREFIX%\lib ^
      -D CMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
      -D FREECAD_LIBPACK_USE=FALSE ^
      -D FREECAD_LIBPACK_USEPYSIDE=FALSE ^
      -D FREECAD_USE_3DCONNEXION=FALSE ^
      -D FREECAD_USE_EXTERNAL_SMESH=TRUE ^
      -D FREECAD_USE_OCC_VARIANT="Official Version" ^
      -D FREECAD_USE_PCH=FALSE ^
      -D FREECAD_USE_PCL=FALSE ^
      -D FREECAD_USE_PYBIND11=TRUE ^
      -D NETGENDATA:FILEPATH=%LIBRARY_PREFIX%/include/netgen ^
      -D NGLIB_INCLUDE_DIR:FILEPATH=%LIBRARY_PREFIX%/include/netgen ^
      -D OCC_INCLUDE_DIR=%LIBRARY_PREFIX%\include\opencascade ^
      -D OCC_LIBRARIES=%LIBRARY_PREFIX%\lib CACHE ^
      -D OCC_LIBRARY_DIR=%LIBRARY_PREFIX%\lib ^
      -D OCC_OCAF_LIBRARIES=%LIBRARY_PREFIX%\lib ^
      -D pybind11_DIR=%ENV_PREFIX%\share\cmake\pybind11 ^
      -D PYTHON_EXECUTABLE=%ENV_PREFIX%\python.exe ^
      -D SWIG_EXECUTABLE=%LIBRARY_PREFIX%\bin\swig.exe ^
      %CODE_PREFIX%
      
pause
changed in cmake-gui

Screenshot 001.png
Screenshot 001.png (22.23 KiB) Viewed 272 times

but no avail, still linker error


linker still uses libboost_program_options.lib

Code: Select all

Error	LNK2005	"class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > boost::program_options::arg" (?arg@program_options@boost@@3V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@A) already defined in Application.obj	FreeCADApp	C:\Users\aio\Miniconda3\envs\freecad-dev\Library\src\App\libboost_program_options.lib(value_semantic.obj)	1		
CMakeCache.txt
(43.94 KiB) Downloaded 6 times