WiiUse library and MAC El Capitan Undefined symbols - c

I'm trying to install WiiUse (https://github.com/rpavlik/wiiuse) on my El Capitan.
First I downloaded all the git, then I followed the instruction and when I try to run the example I get this error:
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How to solve this?

Related

Installing C API for Tensorflow on Macbook M1

I am trying to install C API of tensorflow on Macbook M1 to execute it in Go. I followed this guide by tensorflow developers but got stuck when running the hello_tf.c file with this command gcc hello_tf.c -ltensorflow -o hello_tf.
This is hello_tf.c file
#include <stdio.h>
#include <tensorflow/c/c_api.h>
int main() {
printf("Hello from TensorFlow C library version %s\n", TF_Version());
return 0;
}
And this is the error log:
ld: warning: ignoring file /usr/local/lib/libtensorflow.2.7.0.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
"_TF_Version", referenced from:
_main in hello_tf-6f1778.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation
Any suggestions on how to get the compilation fixed?

I always get an error on VS code when I code in c

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 installed gcc but when i compile my code there is a problem with clang

I installed gcc on my mac os but i don't it doesn't work due to a clang module, i used gcc my_program.c -Wall -o prog.
I have tried to reinstall and to follow some answers online , it doesn't work
When i compiled i got this in my terminal :
Undefined symbols for architecture x86_64:
"_omp_get_thread_num", referenced from:
_tri_pair_impair in tri_pair_impair-a7c555.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 except to be able to compile my C code with gcc to do parallel computing

Linking error using TensorFlow for C on Mac: Undefined symbols for architecture x86_64: "_TF_Version", referenced from: _main in main.o

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

OpenSSL ecc function with macos xcode?

I am trying to use the function EC_KEY_new_by_curve_name(NID_secp256k1) present in openssl. However, when I compile, I get the following error:
undefined symbols for architecture x86_64:
"_EC_KEY_new_by_curve_name", referenced from:
CKey::CKey() in bitcoin.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 have been hinted that macos openssl is not compile with the ECC extensions. Is the problem? If so, how do I correct it?
If you're using the OpenSSL library that comes with MacOS SDK, then it should automatically have 64-bit support built in.
Looking at the first hit on Google, I'm wondering if you are just not including the correct library in your XCode project. Did you get -lcrypto into the project settings, or forget to add libCrypto.dylib to your list of libraries in the project?
On my SnowLeopard (10.6) machine, I see the symbols are defined in libCrypto:
[/usr/lib]:; nm -arch x86_64 libcrypto.0.9.8.dylib | egrep -i new_by_curve
00000000000a4ac0 T _EC_GROUP_new_by_curve_name
00000000000ab540 T _EC_KEY_new_by_curve_name

Resources