linking failure while running unit testing: cannot find -lstdc++
I'm getting the following error while trying to run the generated unit tests:
[cpptest_testrunner.cpp] Checking dependencies for C:\Users\userid\myworkspace.cpptest\project\unit-data\current_tubf179707\cpptest_testrunner.cpp ...
[cpptest_testrunner.cpp] ...done.
[cpptest_testrunner.cpp] "C:\Apps\ots\runtime\msys\gcc\bin\g++" -g "-IC:\Program Files\Parasoft\C++test for Eclipse\10.4\engine\runtime\include" -g -m32 -std=c++0x -O0 -fprofile-arcs -ftest-coverage -DCPUEWS -Ic:/GIT/project/BuildOutputs/build -c -DPARASOFT_CPPTEST -I "C:\Program Files\Parasoft\C++test for Eclipse\10.4\engine\runtime\include" -w -c -xc++ "C:\Users\userid\myworkspace.cpptest\project\unit-data\current_tubf179707\cpptest_testrunner.cpp" -o "C:\Users\userid\myworkspace.cpptest\project\file-data\cpptest_testrunner.cppb4919948\cpptest_testrunner.o"
[cpptest_testrunner.cpp] ...done.
Linking test project...
"C:\Apps\ots\runtime\msys\gcc\bin\g++" -g "C:\Users\userid\myworkspace.cpptest\project\file-data\dmdimglb.c792c7b77\tested\harness_dmdimglb.o" "C:\Users\userid\myworkspace.cpptest\project\file-data\cpputest_EZdat.cpp8bf87160\adds\harness_cpputest_EZdat.o" "C:\Users\userid\myworkspace.cpptest\project\file-data\cpputest_MDF_CC.cppeec22ffc\adds\harness_cpputest_MDF_CC.o" "C:\Users\userid\myworkspace.cpptest\project\file-data\cpputest_MDF_CE.cppeede5efe\adds\harness_cpputest_MDF_CE.o" "C:\Users\userid\myworkspace.cpptest\project\file-data\cpputest_MDF_CG.cppeefa8e00\adds\harness_cpputest_MDF_CG.o" ............."C:\Users\userid\myworkspace.cpptest\project\file-data\safe_stubs_win32.c4049b3f6\harness_safe_stubs_win32.o" "C:\Program Files\Parasoft\C++test for Eclipse\10.4\engine\lib"/cpptestruntime.a -o "C:\Users\userid\myworkspace.cpptest\project\unit-data\current_tubf179707\projectTest.exe"
c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/lib/../lib/libstdc++.a when searching for -lstdc++
c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/lib/../lib\libstdc++.a when searching for -lstdc++
c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/lib/libstdc++.a when searching for -lstdc++
c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/lib\libstdc++.a when searching for -lstdc++
c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:\apps\ots\runtime\msys\gcc\bin../x86_64-w64-mingw32/sysroot/lib/libstdc++.a when searching for -lstdc++
c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:\apps\ots\runtime\msys\gcc\bin../x86_64-w64-mingw32/sysroot/lib\libstdc++.a when searching for -lstdc++
c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/lib/../lib/libstdc++.a when searching for -lstdc++
c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/lib/libstdc++.a when searching for -lstdc++
c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:\apps\ots\runtime\msys\gcc\bin../x86_64-w64-mingw32/sysroot/lib/libstdc++.a when searching for -lstdc++
c:/apps/ots/runtime/msys/gcc/bin/../lib/gcc/x86_64-w64-mingw32/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lstdc++
collect2.exe: error: ld returned 1 exit status
Anyone has any idea about this issue? .
Comments
-
The error is stating that the libstdc++.a it found is not compatible with the objects provided on the link line (32-bit objects with a 64-bit libstdc++). I do not see -m32 on your link line, try adding that and see if the error is resolved.
0