[Interest] link error (and probably a dumb question)

Rainer Wiesenfarth Rainer_Wiesenfarth at trimble.com
Wed Sep 16 11:34:48 CEST 2015


Am 16.09.2015 um 11:19 schrieb René J.V. Bertin:
> [...]  1st command fails and the 2nd succeeds:
>
> 1%> [...] g++ [...] -L/opt/local/build/qtbase/lib -lQt5Sql -lQt5Core.so [...]
> .obj/qsql_sqlite.o: In function `qMakeError':
> [...] undefined reference to `QSqlError::QSqlError [...]
>
> 2%> [...] g++ [...] /opt/local/build/qtbase/lib/libQt5Sql.so /opt/local/build/qtbase/lib/libQt5Core.so [...]
>
> [...]
>
> When I give only QtCore via a full path I'm left with errors about an undefined reference to
> QSqlError::QSqlError [...]

I _think_ that the first command resolves references strictly ordered 
(Q55Sql first, then Qt5Core) while the second resolves them in common.

In this case, using

   ... -lQt5Sql -lQt5Core -lQt5Sql ...

should solve the issue.


Another guess: Does replacing "-lQt5Core.so" with "-lQt5Core" in the 
first command change the behavior?

Best Regards / Mit freundlichen Grüßen
Rainer Wiesenfarth

-- 
Software Engineer | Trimble Imaging Division
Rotebühlstraße 81 | 70178 Stuttgart | Germany
Office +49 711 22881 0 | Fax +49 711 22881 11
http://www.trimble.com/imaging/ | http://www.inpho.de/

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893,
Geschäftsführer: Dr. Frank Heimberg, Hans-Jürgen Gebauer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4275 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150916/0f659b62/attachment.bin>


More information about the Interest mailing list