Compiler Not Looking in Explicit LIB Directory Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
User avatar
Deluge
Earned some good credits
Earned some good credits
Posts: 122
Joined: Fri Apr 30, 2010 4:52 am
Location: USA
Contact:

Compiler Not Looking in Explicit LIB Directory

Post by Deluge »

I have recently compiled wxWidgets 2.9.1 for windows with MinGW/MSYS. My wxWidgets directory is located in C:\Env\wxWidgets-2.9.1. I point the compiler to the lib and include directories, but it doesn't find lib. Here is the command and output:

Code: Select all

$ g++ test.cpp `wx-config --cxxflags --libs` -IC:/Env/wxWidgets-2.9.1/include/wx-2.9 -LC:/Env/wxWidgets-2.9.1/lib -o test
g++.exe: C:/MinGW/lib/libwx_mswu_xrc-2.9.a: No such file or directory
g++.exe: C:/MinGW/lib/libwx_mswu_html-2.9.a: No such file or directory
g++.exe: C:/MinGW/lib/libwx_mswu_qa-2.9.a: No such file or directory
g++.exe: C:/MinGW/lib/libwx_mswu_adv-2.9.a: No such file or directory
g++.exe: C:/MinGW/lib/libwx_mswu_core-2.9.a: No such file or directory
g++.exe: C:/MinGW/lib/libwx_baseu_xml-2.9.a: No such file or directory
g++.exe: C:/MinGW/lib/libwx_baseu_net-2.9.a: No such file or directory
g++.exe: C:/MinGW/lib/libwx_baseu-2.9.a: No such file or directory
It appears to still be looking for the libraries in the default C:/MinGW/lib directory. When I compiled wxWidgets, I set the prefix to /mingw (C:\MinGW), could this be my problem? I think that there is something that I have to change in the wx-config script and think that it has something to do with that prefix. Does anyone know what I am talking about?

Edit: Oops! Sorry, I put this in the wrong forum. Could someone please move it to the compiler forum?

Edit:Yes :) DavidHart
Projects:
Debreate
MyABCs
Stendhal

OSes:
Windows 10 Home (missing my Linux & Freebsd :()
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Post by Auria »

Please post the output of "wx-config --cxxflags --libs", I suspect that's the problem (I believe wx-config on windows is not as automagical as on unix, you may need to point it to your build)
"Keyboard not detected. Press F1 to continue"
-- Windows
User avatar
Deluge
Earned some good credits
Earned some good credits
Posts: 122
Joined: Fri Apr 30, 2010 4:52 am
Location: USA
Contact:

Re: Compiler Not Looking in Explicit LIB Directory

Post by Deluge »

You were right about pointing it. I had to add the "--prefix" flag to where it was installed:

Code: Select all

g++ test.cpp `wx-config --cxxflags --libs --prefix=/c/Env/wxWidgets-2.9.1` -I/c/Env/wxWidgets-2.9.1/include/wx-2.9 -o test
Projects:
Debreate
MyABCs
Stendhal

OSes:
Windows 10 Home (missing my Linux & Freebsd :()
Post Reply