Connecting to Couchbase Server using C SDK - c

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.

Related

Cross Compiling for x64 on ARM (Apple Silicon)

It is definitely possible to target Intel when compiling on an Apple Silicon (ARM64) system, as Xcode does that all the time when building universal bundles of an app. However, I am unable to replicate this compiling a C program with make (specifically Stockfish).
What I've tried
I'm invoking make like so: make build ARCH=x86-64-modern COMP=clang (the same command works when I substitute x86-64-modern for apple-silicon). I've tried using the gcc compiler, which also worked when targeting the apple-silicon arch.
The problem
The make build command terminates with a bunch of errors, most importantly:
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)
Above the error is a bunch of lines complaining that a file was built for an "unknown bitcode architecture:
ld: warning: ignoring file <name>.o, lto file was built for unknown bitcode architecture which is not the architecture being linked (x86_64): <name>.o
So, it seems like the compilation phase succeeds, but the linking phase fails due to missing symbols. How would I acquire and provide the missing symbols to ld such that it can link successfully?

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.

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

WiiUse library and MAC El Capitan Undefined symbols

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?

AdColony 2.0 iOS

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.

Resources