Reputation: 24068
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
Upvotes: 7
Views: 13158
Reputation: 31
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.
Upvotes: 3
Reputation: 24068
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
Upvotes: 11