OS/2, eCS & ArcaOS - Technical > Programming

[Qt ports] Can't understand linking problem (-Zexe / -Zomf)

(1/2) > >>

Mentore:
Hello all.

I'm getting back to porting Qt programs, but I'm having troubles in linking. Here's the scenario: I decided to port Socializer (facebook QT browser) to try and have a native facebook browser native.

Being a Qt 5 application, I solved the JSON problem with an alternative library - works.

The program compiles but doesn't link. If I use -Zomf, the prelinker stops reporting a bunch of undetermined references, while using -Zexe it's g++ (ld) which stops saying it doesn't recognize the -O option. Needless to say, but there's no '-O' option in linker switches.

I also tried to

I attach here the makefile and the error messages reported. I'm currently using GCC 4.73, but the errors are the same. I even tried to delete all the -Z* linker options, and linking stops complaining it can't find the Qt libraries with errors like this:

U:/usr/i386-pc-os2-emx/bin/ld.exe: No such file or directory for QtGui4

or

U:/usr/i386-pc-os2-emx/bin/ld.exe: No such file or directory for QtWebKit4

but the library files (.lib files) are there. I'm really puzzled by this behavior. (Of course it's my ignorance on how gcc / ld work.)

Silvan Scherrer:

--- Quote from: Mentore on June 19, 2015, 06:49:18 pm ---Hello all.

I'm getting back to porting Qt programs, but I'm having troubles in linking. Here's the scenario: I decided to port Socializer (facebook QT browser) to try and have a native facebook browser native.

Being a Qt 5 application, I solved the JSON problem with an alternative library - works.

The program compiles but doesn't link. If I use -Zomf, the prelinker stops reporting a bunch of undetermined references, while using -Zexe it's g++ (ld) which stops saying it doesn't recognize the -O option. Needless to say, but there's no '-O' option in linker switches.

I also tried to

I attach here the makefile and the error messages reported. I'm currently using GCC 4.73, but the errors are the same. I even tried to delete all the -Z* linker options, and linking stops complaining it can't find the Qt libraries with errors like this:

U:/usr/i386-pc-os2-emx/bin/ld.exe: No such file or directory for QtGui4

or

U:/usr/i386-pc-os2-emx/bin/ld.exe: No such file or directory for QtWebKit4

but the library files (.lib files) are there. I'm really puzzled by this behavior. (Of course it's my ignorance on how gcc / ld work.)

--- End quote ---
according to the error.txt it doesn't find the JSon stuff. did you add the library to link with -ljson.lib or such?

Mentore:

--- Quote from: Silvan Scherrer on June 19, 2015, 09:09:34 pm ---
--- Quote from: Mentore on June 19, 2015, 06:49:18 pm ---Hello all.

I'm getting back to porting Qt programs, but I'm having troubles in linking. Here's the scenario: I decided to port Socializer (facebook QT browser) to try and have a native facebook browser native.

Being a Qt 5 application, I solved the JSON problem with an alternative library - works.

The program compiles but doesn't link. If I use -Zomf, the prelinker stops reporting a bunch of undetermined references, while using -Zexe it's g++ (ld) which stops saying it doesn't recognize the -O option. Needless to say, but there's no '-O' option in linker switches.

I also tried to

I attach here the makefile and the error messages reported. I'm currently using GCC 4.73, but the errors are the same. I even tried to delete all the -Z* linker options, and linking stops complaining it can't find the Qt libraries with errors like this:

U:/usr/i386-pc-os2-emx/bin/ld.exe: No such file or directory for QtGui4

or

U:/usr/i386-pc-os2-emx/bin/ld.exe: No such file or directory for QtWebKit4

but the library files (.lib files) are there. I'm really puzzled by this behavior. (Of course it's my ignorance on how gcc / ld work.)


--- End quote ---
according to the error.txt it doesn't find the JSon stuff. did you add the library to link with -ljson.lib or such?

--- End quote ---

I know it seems so, but still - the software package I used to allow the JSon functionalities does not contain a library. Indeed I have to investigate further this issue, but even the documentation does not talk about a library file.

EDIT: indeed I must have eaten my brains in a moment of hunger!!!  :o I included the header and cpp files, but did not modify the .pro file to compile the .cpp files. I'm feeling such an idiot now...

I'm afraid I'm getting too used to fancy IDEs and similar. Ok, back to work. Thank you! I'll report my results eventually.

Mentore

Mentore:

--- Quote from: Mentore on June 19, 2015, 10:14:56 pm ---EDIT: indeed I must have eaten my brains in a moment of hunger!!!  :o I included the header and cpp files, but did not modify the .pro file to compile the .cpp files. I'm feeling such an idiot now...

I'm afraid I'm getting too used to fancy IDEs and similar. Ok, back to work. Thank you! I'll report my results eventually.

Mentore

--- End quote ---

Aaaaannnd... It worked! Socializer.exe is up and running. And it does quite an interesting job, though it seems unable to load images. Nevermind, it's still a nice step forward in creating new OS/2 software. This makes my evening :)

Mentore

ivan:
Hi Mentore,

If you are looking for something to port maybe you could look at Sigil an epub production tool/editor.  As far as I know the last version that used Qt4 was v0.6.2 (I got the source code in case it was deleted as being too old).

Navigation

[0] Message Index

[#] Next page

Go to full version