That doesn't seem to work, since it will not be the same instance (a problem with sharing singletons across dlls).
That doesn't seem to work, since it will not be the same instance (a problem with sharing singletons across dlls).
Don't link to static libs then. It's not a problem of sharing singletons across dlls, but across static libs. Shared objects would work fine.
If you link to Qt libs two times, you are wasting space. What is the reason of linking both the executable and the shared object against static Qt libraries?
Thanks for helping me out on this one. The shared library is used by the Qt exe that I mentioned and another non-Qt application. When I launch from the non-Qt app I just create a QCoreApplication object to process events while the lib does its work.
The Qt based exe links to (this is off the top of my head, I'm not near the machine I'm working on this... heh... it's the weekendOriginally Posted by wysota
):
qmain
qtcore
qtgui
The shared lib links to:
qtcore
qtnetwork
qtxml
Is there something I'm doing wrong here?
Once again, thanks for staying with me on this one.![]()
You didn't understand my question. You said that you have to link statically. Why?
how about instead of linking to a dll, just building another stand-alone exe (that will do the QHttp work) that you just launch from your main exe?
Software Engineer
I'd suggest linking the DLL against ALL the Qt libs needed (by both app and dll itself) and then just linking the executable against the DLL but I'm not sure static linking would ensure all requested symbols would be embedded into the DLL....
Current Qt projects : QCodeEdit, RotiDeCode
gfunk (18th October 2007)
Bookmarks