linking with gcc generated C++ libs fails

Karsten Ballueder karsten@phy.hw.ac.uk
Mon Dec 8 02:37:00 GMT 1997


Hello,

I tried to use egcs-1.0 to compile a C++ program linked against a
shared library with a C++ class library. This failed miserably, giving
me a long list of unresolved references.

Does this mean, that I have to recompile libraries containing C++ code
instead of pure C?

Also, it failed compiling some simple code, with an internal compiler
error, when defining a normal static class variable like:

myClass::variable = 0;

where it is defined as:

class baseClass
{
private:
static int variable;
};

class myClass : public baseClass
{
private:
static int variable;			// this is intentionally duplicated
};

Unfortunately I cannot post the real code here as it is a bit too long.
-- 
Karsten Ballüder http://Ballueder.home.ml.org/ mailto:Ballueder@usa.net
Physics Department, Heriot-Watt University, Edinburgh,EH14 4AS,Scotland
             "In a world without fences, who needs Gates?"



More information about the Gcc-bugs mailing list