Page 1 of 1
Create New Project dynamic-library wx enabled
Posted: Fri Nov 14, 2008 2:49 pm
by valiyuneski
Hi Eran,
dynamic library wx enabled does not give any structure like MFC does simple .h + .cpp file with the sample structure of how a library should look:
int APIENTRY WinMain(...)
All samples i have seen do not seem to compile, can you send some small sample of how should it look like !!!
Kind regards
Valentin
Re: Create New Project dynamic-library wx enabled
Posted: Fri Nov 14, 2008 3:37 pm
by eranif
You dont need any.
Just place your methods and thats it - this is how I do it.
One thing: change the type of the output file from .so to .dll from project settings -> general tab -> output file
Eran
Re: Create New Project dynamic-library wx enabled
Posted: Fri Nov 14, 2008 7:03 pm
by valiyuneski
I have tried the following :
#pragma once
#include <wx/dlimpexp.h>
#ifdef TEST_CREATING_DLL
#define TEST_EXPORT WXEXPORT
#else
#define TEST_EXPORT WXIMPORT
#endif
class WXEXPORT TestDll
{
public:
TestDll();
~TestDll();
void Test();
};
But still does not go !!!
Re: Create New Project dynamic-library wx enabled
Posted: Fri Nov 14, 2008 7:25 pm
by valiyuneski
Oh i got it:
#pragma once
#ifdef WXMAKINGDLL_CODELITE
# define WXDLLIMPEXP_CL WXEXPORT
#elif defined(WXUSINGDLL_CODELITE)
# define WXDLLIMPEXP_CL WXIMPORT
#else /* not making nor using FNB as DLL */
# define WXDLLIMPEXP_CL
#endif
class TestDll
{
public:
TestDll();
~TestDll();
WXDLLIMPEXP_CL void Test();
};
Now it works ...
Thanks for having that in the CODELITE source
Valentin