stiahol a skompiloval som si lib3ds. pri ./configure som zadal prefix do mojho domovskeho adresara a nasledne som toto prekopiroval do /usr/local/include a lib.
a teraz by som chcel zacat tuto kniznicu vyuzivat v programe. jednoduchy program kompilujem ako takto:
gcc -Wall -I/usr/local/include -L/usr/local/lib/ -l3ds 3ds_test.c -o 3ds_test
kompilacia prebehne bez chyby, ale pri pokuse o spustenie dostanem toto:
./3ds_test: error while loading shared libraries: lib3ds-2.so.0: cannot open shared object file: No such file or directory
ldd 3ds_test
linux-gate.so.1 => (0xb80bd000)
lib3ds-2.so.0 => not found libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7f33000)
/lib/ld-linux.so.2 (0xb80a3000)
mozno este zdrojak:
#include <lib3ds.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
Lib3dsFile *file;
file = (Lib3dsFile *) lib3ds_file_open("untitled.3ds");
if (file == NULL) {
perror("nepodarilo sa nacitat subor");
exit(1);
}
lib3ds_file_free(file);
return 0;
}
neviem kde robim chybu s tymi kniznicami.
distro ubuntu intrepid
vopred dakujem za kazdu radu
./tenprogram