From: Kirill S. <xi...@ga...> - 2006-08-20 08:23:55
|
Hi Nazeer, > Then i run the outputs of sample programs. It worked. But when i try to > compile the sample programs then it give the following errors... > > /nazeer@nazeer:~/YAML/tests$ gcc -o test-version test-version.c > > /tmp/ccuxGMpT.o: In function `main': > test-version.c:(.text+0x41): undefined reference to `yaml_get_version' > test-version.c:(.text+0x69): undefined reference to > `yaml_get_version_string' > collect2: ld returned 1 exit status > > The header file (yaml.h) is included then why is the sample program giving > error and not linking. I am new with linux. Can anyone help me. Am i not > configuring yaml correctly, or there is some other problem. Can anyone help > me plz. You need to link it with libyaml, which you just installed. The command $ gcc -o test-version test-version.c -lyaml should do it. Kirill |