Eclipse can’t find linked libraries

I am working with the windows.h functions and everything works fine so far. But when I try to use functions which require me to link external libraries something goes wrong. In this case I am trying to use CreateFont(). I already know that I must link libwinmm.a and libgdi32.a and I've done that: See this screenshot

But when I try to build the project with this command line:

g++ "-LD:\\Programme\\Eclipse\\lib" -o GameTest.exe "src\\choosemealmain.o" "src\\mealchooser.o" "-lD:\\Programme\\Eclipse\\lib\\libwinmm.a" "-lD:\\Programme\\Eclipse\\lib\\libgdi32.a" 

i get following error messages:

d:/programme/eclipse/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lD:\Programme\Eclipse\lib\libwinmm.a

d:/programme/eclipse/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lD:\Programme\Eclipse\lib\libgdi32.a
collect2.exe: error: ld returned 1 exit status

I made sure to doublecheck whether the mentioned libraries are actually to be found in the mentioned path and they are.

I would be glad for any kind of help!



Read more here: https://stackoverflow.com/questions/66246353/eclipse-cant-find-linked-libraries

Content Attribution

This content was originally published by TheBadB at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: