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
SUBDIRS = pro plu
To copy to clipboard, switch view to plain text mode
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"
#include "b.h"
To copy to clipboard, switch view to plain text mode
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
SOURCES += a.cpp b.cpp
To copy to clipboard, switch view to plain text mode
Whereas in Linux the sequence is
SOURCES += b.cpp a.cpp
SOURCES += b.cpp a.cpp
To copy to clipboard, switch view to plain text mode
So, my QMake files has
win32:SOURCES += a.cpp b.cpp
unix:SOURCES += b.cpp a.cpp
win32:SOURCES += a.cpp b.cpp
unix:SOURCES += b.cpp a.cpp
To copy to clipboard, switch view to plain text mode
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.
Bookmarks