Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
cannot find -luser32 etc.
typicalc:
When I compile a WIN32 C project I don't get any warnings or errors but at the end of linking I get:
ld.exe||cannot find -lgdi32|
ld.exe||cannot find -luser32|
ld.exe||cannot find -lkernel32|
ld.exe||cannot find -lcomctl32|
ld.exe||cannot find -lstdc++|
..etc.
If I create a new Win32 C default program it compiles and links just fine. So the libraries should be available.
If I take the C files from the problematic project and add it to the normally compiling and linking project and start getting the "cannot find" linking errors.
I have added in "Project buil option" Linker setting" "link libraries" lines
gdi32
user32
..
etc.
What can I do?
Miguel Gimenez:
If you are using MinGW then you must add libgdi32.a, libuser32.a and so on.
Order of the linked libraries does matter, this libraries should go at the end of the list.
typicalc:
How do I add them?
Miguel Gimenez:
--- Quote from: typicalc on January 30, 2025, 03:14:57 pm ---How do I add them?
--- End quote ---
Just like you did previously:
--- Quote ---I have added in "Project buil option" Linker setting" "link libraries" lines
--- End quote ---
typicalc:
Ok I found what the problem was. When I check on "Target x86 (32bit) [-m32]" I get the problems.
I seems that I do not have the 32bit libraries. How do I install them back? Or would it be easier to re-install Code::Blocks?
Navigation
[0] Message Index
[#] Next page
Go to full version