I am trying to compile a Qt application on osx using Qt creator. Application successfully compiles in widows. But in mac, it gives following linker errors.
2 duplicate symbols for architecture x86_64
linker command failed with exit code 1 (use -v to see invocation)
Does anybody know a way to check what are the duplicate symbols the linker is complaining about? I used following in my .pro file but no success.
QMAKE_LFLAGS += -v
Posting comment by N1ghtLight as an answer.
Duplicate symbols found
error is a linker error, which says that linker has found more than one symbols with the same name. Following are some common causes for this.
cpp
files.You can find out what are the duplicate symbols by checking Compile Output
tab in Qt Creator
In my case, I added duplicate headers at myproject.pro file.
ex) HEADERS += zzzz.h \
... a lot of xxxx.h \
zzzz.h (again)
I deleted duplicate zzzz.h and builded successfully.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With