> > > On Sun, 18 Nov 2001, Shaul Karl wrote: > > > > you have put an inline function inside a '.cc' file. since it is inline, > > > it will NOT be included in the object file 'base.cc', and thus, during > > > link, there base constructor will be undefined. this is your bug - not > > > g++'s. > > > > > > fixes: > > > > > > 1. move the inline function into the header file. > > > 2. make the function not 'inline'. > > > > Are there no other options? In particular, one that is both inline and > > with split files? (inline for speed and splitting the src for > > readability) > > by definition - no. you split source - you can't do inline. inline works > if you put it in the header file. that's the idea of inline - copying the > code to all other sources, rather then having a real function in the > resulting object file. >
This may seem an ugly feature of C++, but in fact it is better than the C counterpart - macros. In fact, writing the implementation of inline functions in header file is a beautiful gem, comparing to writing the implemetation of calss templates in header files. Yuck. Dan. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]