mardi 31 mars 2015

PCG Random Number Generator and Xcode Undefined symbols (unable to find Kernel)

Before asking the question I have to say that I'm currently using Xcode 6.2 on Yosemite.


I have been experiencing this problem also with another C code of mine which involved the generation of random numbers.


So, I wanted to use this famous library to generate random numbers (In particular I'm trying to compile the file called pcg_basic.c that you can find in the download of Minimal C Implementation 0.9). I created the project with Xcode and compiled. Then I got the following error message:



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 googled a bit and it seems that I had to change the Architecture to Universal. Unfortunately it doesn't change a lot because I get the same error for 32bit



Undefined symbols for architecture i386


Then I googled again, thus I added Frameworks and Libraries. Since I didn't know which one I needed, I added all of them. However, I get this error message:



ld: framework not found Kernel
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Which is kind of strange! I'm quite sure the RNG doesn't involve the Kernel.


Does anyone have any idea why I get this error messages? Is it related only with random numbers?





Aucun commentaire:

Enregistrer un commentaire