help-gplusplus
[Top][All Lists]
Advanced

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

Re: Cannot link against my own library due to undefined symbols???


From: Paul Pluzhnikov
Subject: Re: Cannot link against my own library due to undefined symbols???
Date: Tue, 05 Feb 2008 12:50:00 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

Pep <pepaltavista@yahoo.co.uk> writes:

> g++ -I. -L. -ltest -o test-main main.cc

Above command line is incorrect. Try this:

  g++ -I. -L. -o test-main main.cc -ltest 

> I've been looking at this for some time now and am frankly stumped by
> what I know must be a simple case of me not doing something I should
> have but I don't know what.

To understand why the order of sources/objects and libraries on
command line matters, read this:
  http://webpages.charter.net/ppluzhnikov/linker.html

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]