PDA

View Full Version : Porting application from Linux to Win32



giusepped
29th October 2008, 09:25
With my surprise, the compilation of my software developed under linux went well.
I did


qmake
make


But strangely, few things do not work under windows.
For example, in my app I have to choose an SQLite databse. In linux all goes fine, I can connect to the database, but in Windows I can't.
Moreover some icons are missing, although I imported all the "images" folder.
Somebody have ever had these issues?
G

lyuts
29th October 2008, 10:40
Qt can be configured in such a way that it will use system's SQLite. So one of the possible reasons is that it is configured this way but no SQLite is installed on your Windows machine.That's why you cannot connect to your SQLite DB.

giusepped
29th October 2008, 12:09
So, I don't understamd.
In Windows, I just installed the qt with mingw bundled inside (from qt wesite).
What should I do in order to install the sqlite drivers?
Are not they installed by default?
Please, if you have some pointers to give me I will appreciate very much.
g

pastor
29th October 2008, 12:38
So, I don't understamd.
In Windows, I just installed the qt with mingw bundled inside (from qt wesite).
What should I do in order to install the sqlite drivers?
Are not they installed by default?
Please, if you have some pointers to give me I will appreciate very much.
g

Hello!

1) What sql plugins do you have in QTDIR\plugins\sqldrivers\ folder?
2) Do you have warning messages on console\output when your application tried to connect to DB? (I mean something like - "driver not loaded", etc)

lyuts
29th October 2008, 12:56
Suppose you have unpacked qt to QT_HOME directory.
In $QT_HOME you will find configure.exe. Run


configure.exe --help | more

And look at these options. They should help

-qt-sql-<driver>
-plugin-sql-<driver>

Here is how i install qt:
1. Run qt installer
2. cd to QT_HOME
3. configure <my options>
4. mingw32-make
5. mingw32-make install
6. mingw32-make clean

giusepped
29th October 2008, 14:44
Thank you.
I started the compilation and since it takes time I will give some feedbacks tomorrow.
Anyway, it is very surprising that such very usefful info are difficult to find in Qt docs and Qt books as weel, if I well checked.
Regards
Giuseppe

giusepped
30th October 2008, 13:24
After hours of compilation, the compiler fires strange errors, expecially in the linking stage.
On my laptop, it says

...qtaccessiblewidgets4.dll Permission denied
ld returned 1 exit status

On a Desktop machine, I got surprisingly "no enough resources". Useless to say that the PC has 1Gb of memory and 120Gb of hardisk and no process but the configure itself.
Any more hint?

giusepped
31st October 2008, 08:45
Some hints?
I re-did the compilation but nothing.
Strangely, now I can use sql drivers.
But I am quite disappointed of compilation errors...
G

lyuts
31st October 2008, 10:11
That is a good news that sql drivers are available now. As for "resources" problem then it is really strange, i have never come across such error with Qt.
What options did you specify to configure.exe?

pastor
31st October 2008, 10:54
Some hints?
I re-did the compilation but nothing.
Strangely, now I can use sql drivers.
But I am quite disappointed of compilation errors...
G

Try to increase Windows swap

giusepped
1st November 2008, 14:48
That is a good news that sql drivers are available now. As for "resources" problem then it is really strange, i have never come across such error with Qt.
What options did you specify to configure.exe?

Those ones suggested by you.

pastor
2nd November 2008, 14:23
2 giusepped: Did you try to increase swap (pagefile.sys) on your Windows machine? It should solve compilation errors.