On Tue, 2007-06-19 at 14:57 -0700, John Wendel wrote: > Markku Kolkka wrote: > > Les kirjoitti viestissään (lähetysaika tiistai 19 kesäkuu 2007): > >> So just to prove that this didn't change anything I tried: > >> gcc -L X11 GuiExample.cpp > > > > The option is "-lX11", not "-L X11". Linux is case sensitive and > > spaces are also significant. > > > >> I am sorry, and this is probably clear to some of you, but I > >> am at a loss to understand why this doesn't work. If I use > >> gcc, the presence or absence of a library .a or .so shouldn't > >> matter since the compiler should create the link chain based > >> on the extern definition, which could be resolved at load > >> time. > > > > The extern definition doesn't tell which library contains the > > symbol, just the function prototype or variable declaration. > > _You_ must tell the compiler which libraries to link in order to > > resolve the references. > > > > > Actually, in this case, case is important but spaces are not > significant; -l X11 or -lX11 will work. > Thank you to all who replied. It was a combination of things (of course). I knew about the case sensitivity, but had gotten confused due to all the documentation I had read on cpp (the C preprocessor) and gcc (the Gnu compiler) and had picked up the -L vs the -l in there. I had named the program GuiExample.cpp, when in fact it was straight c code. So Johns hint here picked up the lowercase l, and the library as just X11, (I had started with that actually), and the issue with not having the library installed in the first place. Was another hint, and finally I had called it cpp because I wanted the object oriented version, but I had picked the code for a straight C version. Things now are going down the right path. All I need to do now is figure out how to get Eclipse to find the library, and how to simplify the creation of the user interface for the new graphics code I am writing. Thank you one and all for your help. I'm not out of the woods yet, but am finally on the path. I will begin perusing the Eclipse documentation to figure out the rest of what I need. These hello world exercises are important, aren't they? Regards, Les H