linker options go at the end, so try:
g++ -o ex7 -L . ex7.cpp -l ex7Stack
raymundo
exits funnel wrote:
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-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list