E
ernesto
Hi everybody:
I am writing this very small test class using g++ and mingw:
#ifdef DLL
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllimport)
#endif
#include <stdio.h>
class DLLEXPORT MyTestClass
{
public:
MyTestClass() { }
~MyTestClass() { }
int GetSuccessor(int a) { return a + 1; }
int GetPredecessor(int a) { return a - 1; }
};
As you can see, I want to export that class into a DLL.
So, I do:
g++ -shared -o test.dll test.cpp -Wl,-output-def=test.def -DDLL
and my DLL is an empty DLL with no exported symbols!!! (and the .def
file has length 0).
Am I doing something wrong? I am creating a C++ library, so, I want to
export only classes into my DLL.
Thanks in advance
Ernesto
I am writing this very small test class using g++ and mingw:
#ifdef DLL
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllimport)
#endif
#include <stdio.h>
class DLLEXPORT MyTestClass
{
public:
MyTestClass() { }
~MyTestClass() { }
int GetSuccessor(int a) { return a + 1; }
int GetPredecessor(int a) { return a - 1; }
};
As you can see, I want to export that class into a DLL.
So, I do:
g++ -shared -o test.dll test.cpp -Wl,-output-def=test.def -DDLL
and my DLL is an empty DLL with no exported symbols!!! (and the .def
file has length 0).
Am I doing something wrong? I am creating a C++ library, so, I want to
export only classes into my DLL.
Thanks in advance
Ernesto