Hi,
I'm trying to come up with a good solution for a project where I'm aiming at using a component based architecture.
I done this under Win32 using C# to create .net assemblies which are just dlls which can be loaded into the Global Assembly Cache (GAC) the regsitered as a system service.
I'm assuming that Linux offers this in the form of Daemons although I imagine the approach is a little different.
I was hoping that the QtService solution provided on the Trolltech site would help to produce the correct dll type.
I've manged to create a dll called Service1 which subclasses from QtService<QCoreApplication>. It compiles fine, and I'm sure that compiling under linux would give me an equivalent .so file.
The bit that I see as being different is that the dll should have a bunch of extra symbols and win32 interfaces implemented automatically that allow the dll to be loaded into the gac and registered.
This doesn't seem to be the case though.
I tried 'gacutil /i Service1.dll' but I just get the message "An attempt was made to load a program with an incorrect format.'
service1_global.h (generated as part of the project by VS integration) defines the following:
Q_DECL_EXPORT is a QT macro for __declspec(dllexport) which is standard windows dll guff, and my guess is that I need to stick some other macros in which will export the symbols needed for this to qualify as a GAC'able dll.Qt Code:
#ifdef SERVICE1_LIB # define SERVICE1_EXPORT Q_DECL_EXPORT #else # define SERVICE1_EXPORT Q_DECL_IMPORT #endifTo copy to clipboard, switch view to plain text mode
Has anyone gone down this path before?
( And worked it out )
Thanks,
Steve York
Bookmarks