[Qt-interest] C Code with QMake

Thiago Macieira thiago at kde.org
Sun Aug 8 03:34:11 CEST 2010


On Saturday 7. August 2010 22.06.45 Jeffery MacEachern wrote:
> Part of the project I'm working on is a library written in C, which I
> am building with QMake as I do the rest of the project, just for the
> sake of simplicity.  I'm using an Arch Linux system with GCC.  QMake
> compiles all of the C source files with gcc, but then links them
> together using g++, unnecessarily pulling in libstdc++ as a dependency
> in the process.  Is this something I'm doing wrong, or is it a bug?

Neither. QMake doesn't know the difference. It simply assumes that linking must 
be done with the C++ linker.

Try adding this to your .pro file:

QMAKE_LINK = $$QMAKE_LINK_C

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100807/afdbe5fe/attachment.bin 


More information about the Qt-interest-old mailing list