Hi all,
I have a class like this:
namespace A {
class B {
public:
...
void do_one(int) throw();
void do_two() throw() { do_one(42); }
Compiling a (slightly larger) project containing some .cpp files whichQuote:};
}
include the header defining the class above results in the error:
/opt/experimental/include/g++-v3/i686-pc-linux-gnu/bits/gthr-single.h:225:
undefined reference to `A::B::do_one(int)'
It must be noted that none of the .cpp files create an instance of this
class (the header contains some typedefs which are used). After removing
the -fkeep-inline-functions switch from the command line, the project
compiles. It compiles too if I move the body of do_two into a .cpp file.
And it compiles with gcc 2.95.3, even with the -fkeep-inline-functions
switch.
Unfortunatly I wasn't able to reproduce this with a smaller example.
Anybody knows whats going wrong?
Mathias
--
Tel.: +49 621 181 2717 Fax.: +49 621 181 2713