rittchat
27th June 2014, 07:38
This is more of a reporting than a question! Hope somebody will find it useful.
I have a project which produces a executable say pro (in Linux or pro.exe in Windows). This executable, when run, searches for its plugins in a predefined folder. Suppose that in that folder there is plugin say plu.so (in Linux or plu.dll in Windows). This plugin again linked with sqlite3.so (in Linux or sqlite3.dll in Windows). The plugin and the program have different pro files and compiler one after the other using a 3rd pro files which has
SUBDIRS = pro plu
The plugin source code is divided in to two classes A (a.h and a.cpp) and B (b.h and b.cpp). class B wraps sqlite3 library to provide class A some sqlite3 functions in C++ way. So a.h starts with
#include "b.h"
What happens is that for windows I have to set the sequence of cpp files in pro file of the plugin like
SOURCES += a.cpp b.cpp
Whereas in Linux the sequence is
SOURCES += b.cpp a.cpp
So, my QMake files has
win32:SOURCES += a.cpp b.cpp
unix:SOURCES += b.cpp a.cpp
The problem is if I change the sequence in a platform to the sequence of the other platform - the plugin as well as the program crash!!!
Can anyone tell me why this is happening? My code is large so I can't post everything here, sorry for that.
By the way - I am using Windows 7 32bit and Fedora LXDE 64bit both have Qt 5.2 installed.
I have a project which produces a executable say pro (in Linux or pro.exe in Windows). This executable, when run, searches for its plugins in a predefined folder. Suppose that in that folder there is plugin say plu.so (in Linux or plu.dll in Windows). This plugin again linked with sqlite3.so (in Linux or sqlite3.dll in Windows). The plugin and the program have different pro files and compiler one after the other using a 3rd pro files which has
SUBDIRS = pro plu
The plugin source code is divided in to two classes A (a.h and a.cpp) and B (b.h and b.cpp). class B wraps sqlite3 library to provide class A some sqlite3 functions in C++ way. So a.h starts with
#include "b.h"
What happens is that for windows I have to set the sequence of cpp files in pro file of the plugin like
SOURCES += a.cpp b.cpp
Whereas in Linux the sequence is
SOURCES += b.cpp a.cpp
So, my QMake files has
win32:SOURCES += a.cpp b.cpp
unix:SOURCES += b.cpp a.cpp
The problem is if I change the sequence in a platform to the sequence of the other platform - the plugin as well as the program crash!!!
Can anyone tell me why this is happening? My code is large so I can't post everything here, sorry for that.
By the way - I am using Windows 7 32bit and Fedora LXDE 64bit both have Qt 5.2 installed.