TCLUG Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG-DEVEL:124] C++/C linking problems



"Scott J. Pekarek" wrote:

I may end up with a conversation with myself.  I figured out why many
of the symbols where unreferenced.  It had to do with the mechanics
of how I built one of the shared libraries.  Now it is off to how to get
templates to properly instantiate in a shared library.   I could still
use some clues here and if someone has pointers I would be grateful.
I am currently studying the gcc on-line man pages at www.org.gnu.

sjp

> Hi all,
>
> I just recently joined this group and this is my first post and I will
> post a brief intro.
> I am an ok C++ programmer with a fairly strong Unix background (Digital
> Unix/HP-UX/Solaris).  I recently  just started to port some proprietary
> C/C++/*nix code
> to gcc and Redhat 6.1.  I have waded through most of the issues but I am
> stumped on
> why I get tons of "undefined reference to xxxx" - where xxx is generally
> either some
> kind of global or library function in a C shared library.  My main
> source is virtually
> all C++.  The compile line looks ok to me (all the includes/libraries
> appear to line up).
>
> These last few weeks have been my only significant exposure to gcc/g++.
> I am somewhat
> convinced I am doing something generically stupid here (as I am not a
> full time programmer).
> I could fund some serious free beer for anyone who could help me sort
> this out.
>
> Here are my (relevant? - many seemingly irrelevant left out) g++
> command
> line parameters:
>
> g++
> -ggdb
> -DLINUX
> -D_REENTRANT
> -DP_THREADS
> -fstrict-prototype
> -I/opt/mms/include
> -I/opt/mms/mlib-I/usr/X11R6/Xm2.1/include
> -I/usr/X11R6/include
> -I/usr/local/include
> -o
> Action
> Action.C
> -L/home/sjp/src/toolkits/libMe
> -lMe
> -L/usr/local/lib
> -L/usr/local/lib/X11
> -L/usr/X11R6/lib
> -lMrm
> -lUil
> -lXm
> -L/usr/X11R6/lib
> -lXt
> -lX11
> -L/usr/local/lib/gcc
> -lcmdline
>
> sjp
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-devel-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-devel-help@mn-linux.org