From: K. A. <k_a...@ya...> - 2012-06-11 19:36:16
|
Greetings, I'm trying to compile and run the examples in c_calling_XSB, as I need to write a socket-based client that uses XSB. I'm mostly interested in cvarstring_thread.c, because I need to have multiple querying threads. Unfortunately the code in cvarstring_thread.c does not compile - neither on a Linux machine nor on Windows (I tried both). In both cases I get the following errors: cvarstring_thread.c: In function 'main': cvarstring_thread.c:62: warning: implicit declaration of function 'xsb_get_main_thread' cvarstring_thread.c:67: error: 'th_context' undeclared (first use in this function) cvarstring_thread.c:67: error: (Each undeclared identifier is reported only once cvarstring_thread.c:67: error: for each function it appears in.) cvarstring_thread.c:67: error: 'p_th' undeclared (first use in this function) cvarstring_thread.c:71: error: too many arguments to function 'xsb_command_string' cvarstring_thread.c:75: warning: implicit declaration of function 'xsb_ccall_thread_create' cvarstring_thread.c:75: error: 'r_th' undeclared (first use in this function) cvarstring_thread.c:77: error: too many arguments to function 'xsb_command_string' I'm using gcc version 4.4.3, with the right command-line options. Could this be due to some sort of configuration error (e.g., because I didn't explicitly set up XSB to run in multi-threaded mode)? On the other hand, cvarstring.c compiles fine but when I try to create an executable I get a warning and, more seriously, the following error: ... long path prefix here .../saved.o/xsb.o: In function 'startProfileThread': (.text+0x731cd): undefined reference to `pthread_create' collect2: ld returned 1 exit status This is on Linux. (On Windows there doesn't even seem to be a file named xsb.* in saved.o.) Any help will be highly appreciated. Thanks in advance, Konstantine |