libtool
[Top][All Lists]
Advanced

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

Re: issues with undefined symbols.


From: Michael Poole
Subject: Re: issues with undefined symbols.
Date: 13 Jan 2005 14:44:35 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Chris Bowlby writes:

> Hi All,
> 
>   For the last few months I've been testing various capabilities of
> libtool and how it creates links between a parent application and a
> module (in the case of a plug-in system, etc). I've run into a snag in
> relation to undefined symbols, here's some sample code that gives me
> the error:
> 
> main.cxx
> 
> #include "testlog.hxx"
> #include "testuser.hxx"
> 
> static TestLog *log = NULL;
> static TestUser *user = NULL;

[snip]

> test.cxx
> 
> #include "testlog.hxx"
> #include "testuser.hxx"
> 
> extern TestLog *log;
> extern TestUser *user;

static variables like those in main.cxx are visible only within the
translation unit (roughly: source file) that they are defined.  Remove
the "static" to make the log or user variables visible to loaded
modules.

Michael Poole




reply via email to

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