E
Ehtor
I'm trying to create a simple class library that I can statically link.
I'm new to c++.
If I append test code at the bottom of my class source file, compile and
link, the test works fine.
If, when I compile just the class, and create a library using ar and ranlib
and then compile my test program and link it to this library, the program
will seg fault at the closing bracket of the main routine.
I've googled this problem but I don't think I'm using the correct
terminology and have not been able to find a good solution.
I suspect I'm not creating the class library correctly or not compiling
something right. (btw, the class header contains just the class definition
and the public section).
Sorry for the basic question, but any help would be appreciated.
R
I'm new to c++.
If I append test code at the bottom of my class source file, compile and
link, the test works fine.
If, when I compile just the class, and create a library using ar and ranlib
and then compile my test program and link it to this library, the program
will seg fault at the closing bracket of the main routine.
I've googled this problem but I don't think I'm using the correct
terminology and have not been able to find a good solution.
I suspect I'm not creating the class library correctly or not compiling
something right. (btw, the class header contains just the class definition
and the public section).
Sorry for the basic question, but any help would be appreciated.
R