Siarshai / llvm4eclipsecdt

Automatically exported from code.google.com/p/llvm4eclipsecdt
0 stars 0 forks source link

Linker can't find SDL library #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Create a C++ project.
2.Use SDL inside your code.
3.Build the project.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
llvm4eclipsecdt 1.1.7.201106150307
Windows 7 64bit

Please provide any additional information below.
**** Internal Builder is used for build               ****
llvm-ld -v -LC:\dev\MinGW\lib -LC:\dev\mingw\lib\gcc\mingw32\4.5.2 -native -o 
SoftwareRasterizer.exe src\main.bc src\Rasterizer.bc src\Color.bc -lstdc++ 
-lmingw32 -lSDLmain -lSDL
  Linking bitcode file 'src/main.bc'
  Linked in file 'src/main.bc'
  Linking bitcode file 'src/Rasterizer.bc'
  Linked in file 'src/Rasterizer.bc'
  Linking bitcode file 'src/Color.bc'
  Linked in file 'src/Color.bc'
  Linking archive file 'C:/dev/MinGW/lib/libstdc++.a'
  Linking archive file 'C:/dev/MinGW/lib/libmingw32.a'
  Linking archive file 'C:/dev/MinGW/lib/libSDLmain.a'
llvm-ld: error: Cannot find library 'SDL'
Build error occurred, build is stopped
Time consumed: 458  ms.

looks like the linker can't load library files with .la extension.

Original issue reported on code.google.com by mohammed...@gmail.com on 22 Aug 2011 at 9:36

GoogleCodeExporter commented 9 years ago
Seems like the linker (llvm-ld) needs -L flag to define the path where the 
libraries are located.

Original comment by petri.tuononen@gmail.com on 8 Sep 2011 at 6:10