fishysheep
Programmer
Hello
CAn anyone please tell me how to solve the following problem. I want to link my main program (containing #include myclass.h) to an object file.
I have 3 files
myclass.h (class interface)
myclass.cpp (member functions for class and #include "myclass.h"
mainprog.cpp (containg main and #include "myclass.h"
myclass.o (object file)
QUESTION
I should now be able to compile mainprog (which contains #include "myclass.h"
- but when I do this I get linker errors saying that it cant call constructor or any member functions.
What I want to do is that I give .h and .o file to persons, but keep myclass.cpp away from them becuase of code. Is this possible?
thanks you.
All code fine, compiles ok when in same file.
CAn anyone please tell me how to solve the following problem. I want to link my main program (containing #include myclass.h) to an object file.
I have 3 files
myclass.h (class interface)
myclass.cpp (member functions for class and #include "myclass.h"
mainprog.cpp (containg main and #include "myclass.h"
myclass.o (object file)
QUESTION
I should now be able to compile mainprog (which contains #include "myclass.h"
What I want to do is that I give .h and .o file to persons, but keep myclass.cpp away from them becuase of code. Is this possible?
thanks you.
All code fine, compiles ok when in same file.