[Spice-devel] compiling Spice-server test file

Michael A. Collins mike.a.collins at ark-net.org
Fri Feb 17 03:53:41 PST 2012


I am trying to enable spice for qemu and can't get past the check it does by
compiling a c file.  Contents below:
#include <spice.h>
int main(void) { spice_server_new(); return 0; }
Error is:
gcc -fPIE -DPIE -m64 -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
-Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes
-fno-strict-aliasing -I/usr/src/xen-4.2/tools/../tools/include
-I/usr/src/xen-4.2/tools/../tools/libxc
-I/usr/src/xen-4.2/tools/../tools/xenstore -fstack-protector-all
-Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
-Wold-style-declaration -Wold-style-definition -Wtype-limits
-I/usr/include/libpng12 -I/usr/local/include/spice-1
-I/usr/local/include/spice-server -o /tmp/spice-test.exe /tmp/spice-test.c
-Wl,-z,relro -Wl,-z,now -pie -m64 -g -L/usr/src/xen-4.2/tools/../tools/libxc
-L/usr/src/xen-4.2/tools/../tools/xenstore
/tmp/ccZ5JDiP.o: In function `main':
/tmp/spice-test.c:2: undefined reference to `spice_server_new'
collect2: ld returned 1 exit status

I have compiled spice-protocol and spice-server, here is the output of
pkg-config:
cflags = -I/usr/local/include/spice-1 -I/usr/local/include/spice-server

I just don't understand what's going on.  Am I using a very old version of
spice?  I downloaded it yesterday, 0.10-1.  Any help in the right direction
would be greatly appreciated!
Mike





More information about the Spice-devel mailing list