tags:

views:

120

answers:

2

I'm looking for a simple example how to create a DLL library on Windows with WxWidgets. I need use some wxWidgets API on DLL and it'll called from Delphi.

A: 

I think the easiest way is to install the free Visual C++ Express Edition, compile the DLL with that (Visual Studio project files are provided with WxWidgets). If it still works like in the old days, then you will also have to import the library for use in delphi with with the implib command.

Adrian Grigore
Thank you, what i need is how to implement and call WxWidgets api on dll, i had try build dll with WxWidgets use wxDevC++, it compiled fine but it get error when i call function use WxWidgets api.
flashvnn
Without knowing anything about the error you are getting it's impossible to tell what might be going wrong...
Adrian Grigore
Here is my source of simple DLL http://www.flexvn.net/projects/wxDll.zip,It just export function extern "C" __declspec(dllexport) void ShowHello();i call this function in delphi with stdcall but i show error and dont show wxMessageBox
flashvnn
+1  A: 

A new sample showing one way of doing it was just added to wxWidgets itself recently, see http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/samples/dll/

VZ
I think Vadim forgot to mention that you need wxWidgets 2.9.1 for this example :)
m_pGladiator