The class itself is presumably declared in the header, so it's a matter of linking the library correctly. Assuming you've doing that correctly, the issue with your code is that
class myclass x(); is not an object. It's a function declaration, of a function that takes in 0 parameters, and returns a myclass object.
Just do:
1 2
myclass x;
x.myclassfunc();
PS: it should be int main, not just main.
If you are still getting linker errors, post how you're building your library and program. I am assuming this is some *nix system you're on?
This is a tizen app (using Tizen Studio). As I said, the classes are defined/implemented in the lib (I created the lib in a separate project). I guessed that the lib needs to create a header file to be used to define the classes that are exported within it. That is the part I am missing. How do I create that, or, what is in it?
Also, the IDE has a bug that adds the -l<name> before the -L<path> for the linker command, so that part of the linking fails.
About PS: yes I know it is int main, I didn't think it was too important. The "class" part was just an attempt; actually extern myclass x; compiles, but because of the above IDE bug, won't link.
And:
myclass x(); // (should) call myclass::myclass(). myclass x; does the same
If the IDE has a bug, then I'm not quite sure what we can do, but maybe you have the IDE invoke a separate build script that you yourself create?
If you're trying to create a myclass object, the file you're compiling needs to know what a myclass is (this is before the linking stage). So does your header contain something along the lines of :