How to include a library
Willy Gardiol
gardiol at libero.it
Fri May 18 17:23:11 BST 2001
Yes i did it!
but now why it says:
/opt/kde2/lib/libSDL.so: undefined reference to `pthread_create'
/opt/kde2/lib/libSDL.so: undefined reference to `pthread_cancel'
/opt/kde2/lib/libSDL.so: undefined reference to `sem_destroy'
/opt/kde2/lib/libSDL.so: undefined reference to `sem_wait'
/opt/kde2/lib/libSDL.so: undefined reference to `sem_post'
/opt/kde2/lib/libSDL.so: undefined reference to `pthread_mutexattr_setkind_np'
/opt/kde2/lib/libSDL.so: undefined reference to `sem_init'
/opt/kde2/lib/libSDL.so: undefined reference to `pthread_sigmask'
/opt/kde2/lib/libSDL.so: undefined reference to `sem_trywait'
/opt/kde2/lib/libSDL.so: undefined reference to `pthread_mutexattr_init'
/opt/kde2/lib/libSDL.so: undefined reference to `sem_getvalue'
/opt/kde2/lib/libSDL.so: undefined reference to `pthread_join'
/opt/kde2/lib/libSDL.so: undefined reference to `pthread_cond_timedwait'
collect2: ld returned 1 exit status
gmake[2]: Leaving directory `/home/willy/cavpro/cavpro'
gmake[2]: *** [cavpro] Error 1
gmake[1]: Leaving directory `/home/willy/cavpro'
gmake[1]: *** [all-recursive] Error 1
gmake: *** [all-recursive-am] Error 2
*** failed ***
??
thanks again
> You should use the dynamic library. In your KDevelop project you open the
> "Project Options"-Dialog with F7 and add the following things.
>
> to "Compiler Options"->"additional options" add
> -I/usr/include/SDL
> means: where to look for the SDL-header-files
>
> to "Linker Options"->"additional libraries" add
> -lSDL
> means: which library to link additionally
>
> Now include the SDL-include files needed in your sources like:
> #include <SDL_video.h>
>
> That's it
>
> Ole
>
> -
> to unsubscribe from this list send an email to
> kdevelop-request at kdevelop.org with the following body: unsubscribe
> »your-email-address«
--
Willy Gardiol
gardiol at libero.it
www.poli.studenti.to.it/
digilander.iol.it/Shimitar
Orgoglioso di NON essere Cattolico
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list