So I am trying to build a library for Python using SWIG. I made every needed file and tried to compile using this command:
cl /LD /EHsc /MT /Ox /DNDEBUG /D_WINDOWS /D_USRDLL /D_WINDLL /DWIN64 /D_AMD64_ /favor:blend /I"C:pathtopythoninclude" /I"E:softactivateinclude" base_wrap.cxx /link /MACHINE:X86 / LIBPATH:"pathtopythonlibs" /LIBPATH:"E:softactivatelibx64Releasevs2019" python310.lib Licensing.lib /OUT:_base.pyd /p:PlatformToolset=v142
And I’m getting this error:
LINK: warning LNK4044: unrecognized option '/p:PlatformToolset=v142'; ignored
fatal error C1905: Front end and back end are not compatible (must target the same processor).
LINK: fatal error LNK1257: code generation failed
I dont know if it helps, but Visual Studio version is higher than projects, but I use /p:PlatformToolset=v142
, so I dont think its a problem.
Also my project settings:
Configuration Propertis->General
C/C++->Output