Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Re: Project dependcy and linking

> Hi folks:
> 
>     I posted this question last week but haven't gotten any responses.
> Please help this lost soul.

First, this might be, because you are one the wrong place. This is the
developer mailing list for CDT, meaning here should only topics be posted
concerning the development of CDT itself and/or its extensions.

You'd better use the newsgroup.

> Thanks
> 
> -John
> 
> 
> On Sun, 30 Jan 2005 15:46:14 -0800, John Wang <john.wang@xxxxxxxxx> wrote:
> > Hi:
> > 
> >    I have two C++ projects under CDT. One is a static library, e.g.
> > testLib which contains a class A.
> > 
> >    The other is an .exe project, e.g. testCPP, which has a dependency
> > on testLib.
> > 
> >     My problem is that testCPP cannot link correctly to testLib, e.g.
> > it cannot resolve A. I've added A.h to the include path of testCPP but
> > it still could not resolve the objects.

Second, having the linker not finding an object does not have to do with a
header include path, but the library search paths. Though, you would need to
add your library path and the library name in the GCC-Linker Properties
pages of your testCPP project. Then on the first linker page, the cmd-line
should have two parameters -L<the path to you lib-binary> -l<the libname>.

If you don't use the GCC-conventions according library-naming (libMyLib.a
for library MyLib), you need to add your lib on the "Miscelleanous" page
with full path name <path>/libraryname.ext. 

> >     I've set the project reference on testCPP to testLib.
> > 
> >     Any help is greatly appreciated.
> > 
> > Thanks
> > 
> > -John
> >
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-dev
> 

-- 
10 GB Mailbox, 100 FreeSMS http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++


Back to the top