编译Libvlc我试图编译使用GTK + 2在Ubuntu错误,而在C项目
libvlc的一个简单的代码在这里libvlc tuto 发现在C项目,但我有一个这样的错误消息,在功能main
: /home/bilel/esprit-2015-3b1-geekinnovators-svn/pp/src/main.c:65: undefined reference to 'libvlc_new'
。
编译Libvlc我试图编译使用GTK + 2在Ubuntu错误,而在C项目
libvlc的一个简单的代码在这里libvlc tuto 发现在C项目,但我有一个这样的错误消息,在功能main
: /home/bilel/esprit-2015-3b1-geekinnovators-svn/pp/src/main.c:65: undefined reference to 'libvlc_new'
。
您需要链接libvlc。将-lvlc
附加到编译命令。
实施例:
cc -Wall test.c -lvlc
此外,例如应包括含有功能睡眠的声明的POSIX头文件unistd.h中。
vlc代码编译的文件,我现在有可执行文件但我想将它链接到项目,当我添加vlc.c(代码是)到makefile.am我有同样的错误..我想设置两个可执行文件在一起.. – Bine13
@ Bine13 add'-lvlc 'Makefile.am中的* AM_LDFLAGS *。 –
'##处理此文件使用automake产生Makefile.in' INCLUDES = \ -DPACKAGE_DATA_DIR = \ “” $(DATADIR) “\” \ -DPACKAGE_LOCALE_DIR = \ “” $(前缀)/ $(DATADIRNAME )/语言代码 “\” \ @ PACKAGE_CFLAGS @ bin_PROGRAMS = PROJET-C projet_c_SOURCES = \ main.c中\ support.c support.h \ interface.c interface.h \ 的callbacks.c回调。 h \ windows.c windows.h \ Authentification.c Authentification.h \ Alertes.c Alertes.h \ camera.c camera.h \ hello-world.c hello-world.h \ ajoutagent.c Agents.h projet_c_LDADD = @ PACKAGE_LIBS @ $(INTLLIBS) – Bine13
这个问题已经在下面的堆栈溢出链接pl中讨论过了。 checkhttp://stackoverflow.com/questions/16429338/undefined-reference-to-libvlc-new-but-linked-correctly – shri
你安装了libvlc-dev吗? –
我已经看到它并尝试它,但我提到,我使用的是C语言,我没有同化它的权利.. – Bine13