It should work if you just add DynLibTest (without prefix or extension).
Normally it works on both linux and win, gcc should be able to pick up the correct library (if the linker path is set correctly of course).
I cannot figure it out. The linker path is to the directory of the DynLibTest project where the libDynLibTest.so file is found.
I have tried these variants of the name
libDynLibTest.so : "ld cannot find -lDynlibTest.so"
libDynLibTest : results in undefined references to the class member functions I am calling, followed by "collect2: ld returned 1 exit status"
DynLibTest.so : "ld cannot find -lDynlibTest.so"
DynLibTest : results in undefined references to the class member functions I am calling, followed by "collect2: ld returned 1 exit status"
So from what you say, it seems that using "DynLibTest" is correct, but now my problem is maybe that the exported classes are not really exported? In any case, none of the above work. Is there some way I can check whether the .so I have generated actually exports the functions? On windows I use Dependency Walker (depends.exe) for that purpose.
I am also assuming I don't have to explicitely export classes on Linux. I use the following (simplified)
#ifdef WINDOWS
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT
#endif
class DLL_EXPORT foo {
public:
foo();
~foo()
};