[Qt-interest] Linking C programs with qmake
Nikos Chantziaras
realnc at arcor.de
Mon Dec 13 17:03:13 CET 2010
On 12/13/2010 03:49 PM, Oliver.Knoll at comit.ch wrote:
> On 2010-12-13 Nikos Nikos Chantziaras wrote:
>
>> I have a project that consists of only *.c files. Right now, I specify
>> this in my *.pro file:
>>
>> QMAKE_LINK = $$QMAKE_LINK_C
>> This seems to work just fine, but I have to wonder whether this is actually the
>> correct ...
>
>[...]
> I know that you can set the "language" of a given project, as in
>
> LANGUAGE = C++
>
> (which I guess is the default anyway).
>
> Did you try
>
> LANGUAGE = C
>
> Does that make any difference?
Nope, no difference.
For the record, in case someone searches the list in the future about
this, one should probably also get rid of the default rpath (that points
to /usr/lib/qt4 or similar), since that also doesn't make sense for
non-Qt projects. So this is enough it seems:
QMAKE_LINK = $$QMAKE_LINK_C
QMAKE_LFLAGS_RPATH =
This results in a nice, clean gcc link invocation.
More information about the Qt-interest-old
mailing list