delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/20/17:29:42

Message-Id: <199704202125.RAA11903@hcst.net>
From: "Bryan Murphy" <bf461 AT cleveland DOT freenet DOT edu>
To: <djgpp AT delorie DOT com>
Subject: C++ Question and Thanks
Date: Sun, 20 Apr 1997 16:22:31 -0400
MIME-Version: 1.0

Hey, thanks to all who've helped me with my previous barrages of 
questions.  The help has been much appreciated!  My programs 
coming along nicely now.

Now, I have a C++ question, I'm not sure if it's DJGPP or just C++,
anyways, here is what I did:

I created a class called UGL_BITMAP in a file called ugl_bitmap.h.
I defined ALL the procedures (including constructor and destructor)
in ugl_bitmap.cc and they were ALL inlined.

I inserted the compiled class into a library.

When I linked with the library, I got undefined references to 
UGL_BITMAP and all it's procedures.

I added a procedure void Dummy() to the class, I did NOT inline
it, recompiled, reinserted it into the library, and the program linked
fine.

My question:  Why is this so?  Is this a quirk of GPP or DJGPP?
Or are you not allowed to inline all functions of a class when it's
inserted into a library file?  This strikes me as being very odd....
o



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019