Here's what I get:
Undefined symbols for architecture i386:
"_CMTimeMake", referenced from:
-[ADCVideo replay] in libAdColony.a(ADCVideo.o)
-[ADCVideo resume] in libAdColony.a(ADCVideo.o)
-[ADCVideo setupPlayer] in libAdColony.a(ADCVideo.o)
"_kCMTimeZero", referenced from:
-[ADCVideo replay] in libAdColony.a(ADCVideo.o)
-[ADCVideo resume] in libAdColony.a(ADCVideo.o)
-[ADCVideo setupPlayer] in libAdColony.a(ADCVideo.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am trying to setup the new sdk. Just took out the old sdk files (from previous version), and plopped in the new ones. Libraries and linking look to be ok, or setup as per guide. What else could it be?
Those functions are from the framework CoreMedia. Make sure you are linking with CoreMedia framework.
Related
I've been trying to connect to a Couchbase. cluster using the C SDK but have been getting this error :
"_lcb_createopts_connstr", referenced from:
_main in minimal.c.o
"_lcb_createopts_create", referenced from:
_main in minimal.c.o
"_lcb_createopts_credentials", referenced from:
_main in minimal.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
OS : macOS Big Sur.
Any help would be greatly appreciated.
The error occurs during the linking phase. Ensure that you have properly configure your linker to use the libcouchbase.
I have just started coding in c on my MacBook Air(m1). But whenever I code anything on VS code it throws the following error.
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have installed all the extensions and the clang as well but it always shows this error. I am new to coding and have very little idea about it.
I am working on Mac and I installed TensorFlow for C following this tutorial: https://www.tensorflow.org/install/install_c
When I try to validate the installation by running the tutorial example "hello_tf.c" I get the following message error:
Undefined symbols for architecture x86_64:
"_TF_Version", 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)
I installed TensorFlow by looking this tutorial here https://www.tensorflow.org/install/install_mac and the validation was successful.
How can I fix this problem? I would be also interested to know the reasons for this issue
I'm working on AES Encryption with PJSIP open source library. The library which is used for AES Encryption is not built-in library available in C Programming. So, I have gone with external library (Libmcrypt) for AES Encryption.
I followed this site for build the libmcrypt library into my machine(MAC OSX).
https://coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-10-yosemite-development-server/
https://gist.github.com/bricef/2436364
While building those library it created one dynamic library(libmcrypt.dylib) in /usr/local/lib/ path. when checking the architecture of that library using lipo -info libmcrypt.dylib command, it shows
Non-fat file: libmcrypt.dylib is architecture: x86_64
But I'm creating these applications for Android and IOS devices using PJSIP. Their architectures are armeabi(android) and armv7(IOS).
While Linking the libmcrypt.dylib(x86_64) into PJSIP library(armv7), it shows following errors.
Undefined symbols for architecture armv7:
"_mcrypt_enc_get_block_size", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mcrypt_generic", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mcrypt_generic_deinit", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mcrypt_generic_init", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mcrypt_module_close", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mcrypt_module_open", referenced from:
_encrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
"_mdecrypt_generic", referenced from:
_decrypt_AES in libpjsip-armv7-apple-darwin_ios.a(aes.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../bin/pjsip-test-armv7-apple-darwin_ios] Error 1
make[1]: *** [pjsip-test-armv7-apple-darwin_ios] Error 2
make: *** [all] Error 1
I don't know a lot about these architectures. Is it possible to convert libmcrypt.dylib(x86_64) into libmcrypt.dylib(armv7). If Yes, then guide me how to convert it into armv7 architecture and if not then sorry for wasting your time.
Thanks in Advance!
Don't use mcrypt. The MCrypt library has not been updated since 2007. It is highly recommended you switch to OpenSSL or another maintained encryption project.
The PJSIP documentation has instructions on how to use OpenSSL for both IOS and Android devices:
https://trac.pjsip.org/repos/wiki/Getting-Started/iPhone#OpenSSLSupport
https://trac.pjsip.org/repos/wiki/Getting-Started/Android#OpenSSLSupport
Instead of using libmcrypt library, we can use below openssl(Github) projects for creating libraries on all architectures as Suggested by above answer. Thank you #Tim.
Use this project build-libssl.sh file for compiling for all architectures both on Android and IOS.
For Android,
https://github.com/ruslansalikhov/openssl-for-android
For IOS,
https://github.com/x2on/OpenSSL-for-iPhone
Just download and compile the project using build-libssl.sh file. It will creates all library for your platform. Either in Android or IOS.
Download the Project and go to the project directory using cmd/terminal.
cd OpenSSL-for-iPhone/
Compile the Project using following command,
./build-libssl.sh
NOTE:
Machine must have gcc compiler and SDK installed(Android ndk and IOS).
After Successfull Compilation, go to you PROJECT_DIR(OpenSSL-for-iPhone)/lib folder. Check there is four libraries created for all architectures.
Use following command to check supported Architectures by the library file. Go to the lib path on cmd/terminal interface and check,
lipo -info libcrypto.a
It will show which architectures are supported by the library file.
Architectures in the fat file: libcrypto.a are: i386 armv7s armv7
x86_64 arm64
So I am learning OpenGL 4 from openglbook.
I copied and pasted the simple window creating program in my editor and followed Compiling OpenGL programs on OS X by using
gcc -o hello hello.c -framework OpenGL -framework GLUT
I got the following error:
Undefined symbols for architecture x86_64:
"_glewGetErrorString", referenced from:
_Initialize in chapter-c8ba2d.o
"_glewInit", referenced from:
_Initialize in chapter-c8ba2d.o
"_glutInitContextFlags", referenced from:
_InitWindow in chapter-c8ba2d.o
"_glutInitContextProfile", referenced from:
_InitWindow in chapter-c8ba2d.o
"_glutInitContextVersion", referenced from:
_InitWindow in chapter-c8ba2d.o
"_glutSetOption", referenced from:
_InitWindow in chapter-c8ba2d.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
If I understand correctly, the problem is tha -framework GLUT means that you're linking against the GLUT framework shipped by Apple with macOS and located inside /System/Library/Frameworks folder. This GLUT implementation unfortunately lacks some functionality provided by current version of FreeGLUT. And OpenGLBook.com tutorials use some of this functionality, thus, as it is mentioned many times here, the code examples have to be compiled with FreeGLUT.
There are, of course, few ways this can be done. The easiest one is by installing freeglut by means of the infamous Homebrew package manager and then setting up the CMake project as described below.
So, first install freeglut
brew install freeglut
Then setup CMake project by adding the following lines into CMakeLists.txt
find_package(FreeGLUT CONFIG REQUIRED)
find_package(glew CONFIG REQUIRED)
link_libraries(FreeGLUT::freeglut GLEW::GLEW)