Beginner trouble linking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm new to Linux/Unix development and I"m having a bit
of trouble with something quite basic.  I've written a
simple test library located in
ex7Stack.h/ex7Stack.cpp.  I am able to build the
library as follows:

g++ -c -o ex7Stack ex7Stack.cpp

I then write a small test program located in ex7.cpp
which uses the stack library.  I then try to build
this program as follows:

g++ -o ex7 -L . -l ex7Stack ex7.cpp

but the linker complains that it can't find
-lex&Stack.

I can't figure out how to identify my library to the
linker?  Can anyone point out what I'm doing wrong?

ps - I can build everything if I do it in one fell
swoop as follows:

g++ -o ex7 ex7Stack.cpp ex7.cpp



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@redhat.com
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux