Create New Project dynamic-library wx enabled

General questions regarding the usage of CodeLite
valiyuneski
CodeLite Enthusiast
Posts: 40
Joined: Fri Jul 11, 2008 11:13 pm
Contact:

Create New Project dynamic-library wx enabled

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Create New Project dynamic-library wx enabled

Post 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
Make sure you have read the HOW TO POST thread
valiyuneski
CodeLite Enthusiast
Posts: 40
Joined: Fri Jul 11, 2008 11:13 pm
Contact:

Re: Create New Project dynamic-library wx enabled

Post 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 !!!
valiyuneski
CodeLite Enthusiast
Posts: 40
Joined: Fri Jul 11, 2008 11:13 pm
Contact:

Re: Create New Project dynamic-library wx enabled

Post 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
Post Reply