LD linker still being used with clang

CodeLite installation/troubleshooting forum
metamorphosis
CodeLite Enthusiast
Posts: 45
Joined: Tue Jan 28, 2014 3:03 pm
Genuine User: Yes
IDE Question: C++
Contact:

LD linker still being used with clang

Post by metamorphosis »

Setup 9.07 to use clang 3.71, for some reason it still is using ld.exe and linking a bunch of libraries I haven't specified:

Code: Select all

C:\Windows\system32\cmd.exe /C D:/programming/libraries/mingw/bin/mingw32-make.exe -j2 SHELL=cmd.exe -e -f  "plf_colonies.mk"  MakeIntermediateDirs && D:/programming/libraries/mingw/bin/mingw32-make.exe -j2 SHELL=cmd.exe -e -f  "plf_colonies.mk"  all
----------Building project:[ plf_colonies - Release ]----------
D:/programming/libraries/llvm/bin/clang++.exe  -c  "D:/programming/projects/plf_colony/code/benchmark.cpp" -O2 -march=native -m32 -fomit-frame-pointer  -DNDEBUG  -o ./Release/code_benchmark.cpp.o -ID:/programming/libraries/mingw/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++ -ID:/programming/libraries/mingw/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/x86_64-w64-mingw32 -ID:/programming/libraries/mingw/lib/gcc/x86_64-w64-mingw32/5.1.0/include/c++/backward -ID:/programming/libraries/mingw/lib/gcc/x86_64-w64-mingw32/5.1.0/include -ID:/programming/libraries/mingw/include -ID:/programming/libraries/mingw/lib/gcc/x86_64-w64-mingw32/5.1.0/include-fixed -ID:/programming/libraries/mingw/x86_64-w64-mingw32/include  -I. -Id:/programming/libraries/SDL/include/SDL2 -Ic:/programming/mingw/include
D:/programming/libraries/llvm/bin/clang++.exe -o ./Release/plf_colonies @"plf_colonies.txt" -L. -Ld:/programming/libraries/SDL/lib -Lc:/programming/mingw/lib   -lSDL2 -m32
D:\programming\libraries\mingw\bin\ld.exe: cannot find crt2.o: No such file or directory
D:\programming\libraries\mingw\bin\ld.exe: cannot find crtbegin.o: No such file or directory
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lstdc++
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lmingw32
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lgcc_s
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lgcc
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lmoldname
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lmingwex
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lmsvcrt
D:\programming\libraries\mingw\bin\ld.exe: cannot find -ladvapi32
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lshell32
D:\programming\libraries\mingw\bin\ld.exe: cannot find -luser32
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lkernel32
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lmingw32
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lgcc_s
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lgcc
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lmoldname
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lmingwex
D:\programming\libraries\mingw\bin\ld.exe: cannot find -lmsvcrt
D:\programming\libraries\mingw\bin\ld.exe: cannot find crtend.o: No such file or directory
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
mingw32-make.exe: *** [Release/plf_colonies] Error 1
plf_colonies.mk:78: recipe for target 'Release/plf_colonies' failed
====0 errors, 0 warnings====
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: LD linker still being used with clang

Post by eranif »

Well, as you can see from the build log, CodeLite does not invoke LD directly, but instead it calls this line:

Code: Select all

D:/programming/libraries/llvm/bin/clang++.exe -o ./Release/plf_colonies @"plf_colonies.txt" -L. -Ld:/programming/libraries/SDL/lib -Lc:/programming/mingw/lib   -lSDL2 -m32
i.e. it executes clang++ which in turn, executes MinGW ld.exe so not really a CodeLite issue here...

If you do solve this, please post here how did you fix this
Eran
Make sure you have read the HOW TO POST thread
Post Reply