how to export dll with gui?
hi guys, im current having problem in exporting dll, e.i, i want to export my dll with gui and its class functions. currently i can export a dll like this:
Quote:
#ifdef Q_WS_WIN
#define MY_DLL __declspec(dllexport)
#else
#define MY_DLL
#endif
extern "C" MY_DLL int sum(int a, int b)
{
return (a + b);
}
now my question is, how can i export dll with gui as well as its class functions? many thnks
Re: how to export dll with gui?
Quote:
Originally Posted by
cutie.monkey
now my question is, how can i export dll with gui as well as its class functions? many thnks
You can look into Qt-Plugins for this purpose.
http://doc.trolltech.com/4.5/plugins-howto.html#the-lower-level-api-extending-qt-applications
Re: how to export dll with gui?
i think exporting plugins is different from exporting dll with class functions. anyway thnks for your reply.. any help would be very much appreciated..
Re: how to export dll with gui?
Is the code project article series by Mahmoud Komeily any good for you?
http://www.codeproject.com/KB/DLL/Dllfun.aspx
Admittingly it is aimed at MSVC, but it still might be helpful.
Re: how to export dll with gui?
But, what problem ???
for example:
Code:
....
typedef string (CALLBACK* EXECSQL)(string, string, int);
typedef int (CALLBACK* MSGBOX) (string, int);
class SCRIPTENGINE_EXPORT ScriptEngine
{
public:
ScriptEngine();
~ScriptEngine();
bool LoadScripts(string);
void Clear();
int CallFunction(string cFunction, ScriptVal sVal, string& cOut);
void GetLastError(string &cError);
void SetPtrExecSql(EXECSQL pfnExecSql);
void SetPtrMsgBox (MSGBOX pfnMsgBox);
private:
string m_Scripts;
string m_Error;
};
scriptengine_global.h
Code:
#ifndef SCRIPTENGINE_GLOBAL_H
#define SCRIPTENGINE_GLOBAL_H
#include <QtGlobal>
#ifdef SCRIPTENGINE_LIB
#define SCRIPTENGINE_EXPORT Q_DECL_EXPORT
#else
#define SCRIPTENGINE_EXPORT Q_DECL_IMPORT
#endif
#endif // SCRIPTENGINE_GLOBAL_H
Re: how to export dll with gui?
Quote:
Originally Posted by
Fastman
But, what problem ???
currently i can export and call dll but without gui. now, what im trying to do is to add ui in my dll then call it from my application.