Undefined symbols for architecture x86_64:
Unsolved
General and Desktop
-
Hi,
I have a problem that has not been solved for a long time.ld: warning: ignoring file /usr/local/lib/libhiredis.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 Undefined symbols for architecture x86_64 "_redisConnect", referenced from: _main in main.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [../_debug64/Battle.app/Contents/MacOS/Battle] Error 1
Thank. you
-
Hi, and welcome!
@Victor-Dai said in Undefined symbols for architecture x86_64::
/usr/local/lib/libhiredis.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
You are using an x86_64 compiler but you are trying to link to an ARM64 library. That is not allowed.
Some possible solutions are:
- Install an x86_64 version of libhiredis, OR
- Wait for Qt 6.2 to be released, and then build your application with an ARM64 compiler: https://bugreports.qt.io/browse/QTBUG-85279