MADEAPPS / newton-dynamics

Newton Dynamics is an integrated solution for real time simulation of physics environments.
http://www.newtondynamics.com
Other
928 stars 183 forks source link

3.14 linker issue with mingw and ld.bfd.exe #289

Open jonesmz opened 1 year ago

jonesmz commented 1 year ago
cmd.exe /C "cd . && C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin\g++.exe -Wl,-fuse-ld=bfd -fuse-linker-plugin -O3 -DNDEBUG -flto=auto -fno-fat-lto-objects   -shared -o Release\libdCustomJoints.dll -Wl,--out-implib,3rdparty\newton-dynamics\newton-3.14\sdk\dCustomJoints\libdCustomJoints.dll.a -Wl,--major-image-version,0,--minor-image-version,0 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomAlloc.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomBallAndSocket.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomCorkScrew.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomDoubleHinge.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomDoubleHingeActuator.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomDryRollingFriction.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomFixDistance.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomGear.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomHinge.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomHingeActuator.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomJoint.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomJointLibraryStdAfx.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomKinematicController.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomListener.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomMotor.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomPathFollow.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomPlane.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomPulley.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomRackAndPinion.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomSixdof.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomSlider.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomSliderActuator.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomSlidingContact.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomTriggerManager.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomUpVector.cpp.obj 3rdparty/newton-dynamics/newton-3.14/sdk/dCustomJoints/CMakeFiles/dCustomJoints.dir/dCustomWheel.cpp.obj  3rdparty/newton-dynamics/newton-3.14/sdk/dgNewton/libnewton.dll.a  3rdparty/newton-dynamics/newton-3.14/sdk/dMath/libdMath.dll.a  3rdparty/newton-dynamics/newton-3.14/sdk/dContainers/libdContainers.dll.a  3rdparty/newton-dynamics/newton-3.14/sdk/dgPhysics/libdgPhysics.dll.a  3rdparty/newton-dynamics/newton-3.14/sdk/dgCore/libdgCore.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
c:/programdata/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.bfd.exe: c:/programdata/chocolatey/lib/mingw/tools/install/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/libstdc++.dll.a(d006637.o):(.idata$5+0x0): multiple definition of `__imp__ZdlPv'; 3rdparty/newton-dynamics/newton-3.14/sdk/dContainers/libdCon

Where

__imp__ZdlPv

demangles into

__imp_operator delete(void*)

See this github actions workflow run here: https://github.com/jonesmz/osp-magnum/actions/runs/3110403879/jobs/5041550969

This appears to have something to do with

both defining operator delete and causing duplicate symbols during the link step.