[Interest] Linker ObjC Flag issue

Remy Rouvin remy.rouvin at gmail.com
Sun May 8 12:31:04 CEST 2022


Hi,

I need to add Firebase framework to my iOS project.

Firebase requires to add -ObjC flag to the linker.

Unfortunately, when I add this flag I have a lot of duplicate symbols
errors:

 

.

duplicate symbol 'IOSProximitySensor::s_startCount' in:

 
/Users/remy/Qt/6.3.0/ios/plugins/sensors/libqtsensors_ios.a(iosproximitysens
or.mm.o)

 
/Users/remy/Qt/6.3.0/ios/plugins/sensors/libqtsensors_ios_debug.a(iosproximi
tysensor.mm.o)

duplicate symbol 'IOSProximitySensor::id' in:

 
/Users/remy/Qt/6.3.0/ios/plugins/sensors/libqtsensors_ios.a(iosproximitysens
or.mm.o)

 
/Users/remy/Qt/6.3.0/ios/plugins/sensors/libqtsensors_ios_debug.a(iosproximi
tysensor.mm.o)

ld: 2182 duplicate symbols for architecture arm64

 

I am compiling in Release mode.

I seems that Qt add link to both Release AND Debug libraries.

Is it something I misconfigure in my CMAKE configuration or is it the normal
behavior ?

 

I succeeded in linking my project by using "force_load" flag for the
specifics Firebase libraries, but it is a bit messy.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220508/368dabe1/attachment.htm>


More information about the Interest mailing list