Unsolved "symbol(s) not found for architecture x86_64" error when compiling a Qt project on Mac
-
@Donald-Duck Most probably CursorControl is null pointer or dangling pointer. But I don't know why. Maybe you're doing something wrong in your code?
-
@jsulm That's not my code, it's Irrlicht's code. Irrlicht is a library that I'm using. I don't think there is anything wrong in my own code since it compiles and runs just fine on Windows and Linux.
-
Hence my suggestion to re-build Irrlicht against the same C++ library as Qt.
-
@Donald-Duck said in "symbol(s) not found for architecture x86_64" error when compiling a Qt project on Mac:
I don't think there is anything wrong in my own code since it compiles and runs just fine on Windows and Linux
From my own experience I know that such assumptions are often wrong :-)
But you should follow what @SGaist suggested. -
@SGaist I tried rebuilding libIrrlicht.a with libc++ and without adding
LIBS += -stdlib=libc++
andLIBS += -lc++
to my .pro file and it compiled and crashed just like first. It crashed at exactly the same place with exactly the same error. -
@jsulm I tested to see if the problem was in my code or in Irrlicht by copy-pasting a code from an Irrlicht tutorial that I know is correct into a new project and it crashed just like in my project. So the problem isn't in my code but in the Irrlicht library.
-
To be sure we're on the same page, you are calling
irr::createDeviceEx
and this crashes, right ? -
@SGaist Yes.
-
Since you are building Irrlicht anyway, I'd add some checks for CursorControl to see whether the pointer is null or just invalid.
-
@SGaist I checked and the pointer is null.
-
As a quick workaround to be able to run your application, add an if around the code using that variable.
The more involved method would be to find why it's null.
-
@SGaist said in "symbol(s) not found for architecture x86_64" error when compiling a Qt project on Mac:
The more involved method would be to find why it's null.
I've posted a question on the Irrlicht forum to find out why it's null: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=51856&p=301630