c++ - qmake: How to link a library twice? -


i need link liba.a library in qmake file twice:

libs = -la \        -lb \        -la \        -lc \        -ld 

but qmake removing first -la while running g++. should do?

tell qmake disable merging of libs flags with:

config += no_lflags_merge

however, result in duplicate libraries not cleaned up. shouldn't matter in practice though.

alternatively, can trick qmake doesn't find duplicate libary; since matches strings , doesn't parse library flags, can do:

libs += -la -lb -l -lc -ld

note difference between -la , -l a. makes sure qmake doesn't see flags equal, though compiler's point of view, equal, since compiler actual command line argument parsing while qmake not.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -