Libraries not being found by ld.exe

Hi All, I have been spending hours scavenging the web and these forums to find a solution to my problem. I have spent even more hours trying to solve the problem using the command line and knowledge that I have gained.

Basically I used wxFormBuilder to generate source code for a very simple gui. This left me with:

FirstWorkiing.cpp
FirstWorkiing.h

yes Workiing is the actual spelling of the file!!!

ok, next I am trying to compile FirstWorkiing.cpp by typing in:

g++ FirstWorkiing.cpp

The response I get is:

./\FirstWorkiiing.h:11:24: fatal error: wx/artprov.h: No such file or directory compilation terminated.

ok, next I specified where artprov.h was located and tried to recompile:

g++ -IC:\SourceCode\Libraries\WxWidgets2.8\include FirstWorkiing.cpp

The response I get is basically 100 undefined references to functions. I assume this is due to the fact that the libraries in which these functions exist are not linked with the linker.

ok, so I link the base wx library which includes all ex libraries:

g++ -IC:\SourceCode\Libraries\WxWidgets2.8\include -LC:\SourceCode\Libraries\WxWidgets2.8\lib\gcc_lib -lwxbase28 FirstWorkiing.cpp

The response I get is:

C:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lbase28


I know that within C:\SourceCode\Libraries\WxWidgets2.8\lib\gcc_lib there exists the file named libwxbase28.a which IS a static library to the best of my understanding. whether or not it is the base static library which is supposed to include all wx libraries as depicted in the diagram of this site:

http://docs.wxwidgets.org/2.9.3/page_libs.html

is something that I am not sure of and isn't of particular concern to me at this point in time UNLESS libwxbase28.a not being the master library including the libraries that I need is causing this compilation error.

My real question here is how in the world is the compilers linker(ld.exe) NOT finding the library that I so directly specified in the right format?

Please be constructive here and dont pass me off by saying look at the man page for g++ because I HAVE!!! lol

Thanks
My Code::Blocks had the same problem, look not at the main page for g++ but at their daily builds. Chances are, you got a bad installer, or accidentally torqued some settings in the compiler if it has worked before. Either case, get the daily build and reinstall. 99% of the time, your troubles will vanish like good cookies.
<Edit> If that doesn't work for you, go to the UNIX/Linux forum. As a PC, there is very little I can tell you. </edit>
Last edited on
Umm I'll try that, but I don't think that I will be going into the UNIX/LINUX Forum as I am running in windows 7, thus the path C:\...

Will try to download a daily build and reinstall mingw.

Thanks
Also the official mingw site does not offer a daily build, the most recent installation offered for windows was released on 4/27/2012.

Any other ideas?
Topic archived. No new replies allowed.