Am 22.01.2015 um 17:37 schrieb Richard Weickelt:
>> 2.) correct switch for static libraries is: -Wl,--whole-archive -l(list
>> of libraries) -Wl,--no-whole-archives
>>
>> -> added the following line to product section of myAppl.qbs: 
>> cpp.linkerFlags : [ "-Wl, --whole-archive -lreflexlibrary
>> -Wl,--no-whole-archives" ]
>>
>> -> compiler error: /usr/bin/ld: unrecognized option
>> '--no-whole-archives'
> 
> Typo. Remove the trailing s.
> 

Yeah, but fixing the typo(s) was not enough. It seems qbs does some
strange things with commas and spaces ;)

Also the ld man page is not consistent regarding the use of single vs.
double dashes for the option.

Also libreflexlibrary.a is not found via LD_LIBRARY_PATH. The dirty
workaround we used now is to provide the full path to the library and
split the sequence into three parameters. This is of course very very
ugly. I guess building the dynamic library would still be preferable.
But I did not look at those linker errors.

Stefan

Antwort per Email an