tags:

views:

93

answers:

3

in the error log:

CLSQL is doing:

gcc -I /usr/local/include/mysql -I /usr/include/mysql -I /sw/include/mysql -I /opt/local/include/mysql -I /usr/local/mysql/include -fPIC -c clsql_mysql.c -o clsql_mysql.o

and gets error: clsql_mysql.c:34:19: mysql.h: No such file or directory and a bunch of C errors because it doesn't include a header.

I want it to do:

gcc -I /usr/local/include/mysql -I /usr/include/mysql -I /sw/include/mysql -I /opt/local/include/mysql -I /usr/local/mysql/include <b>-I /usr/local/mysql/include/mysql</b> -fPIC -c clsql_mysql.c -o clsql_mysql.o

I tried running: (clsql:push-library-path #P"/usr/local/mysql/include/mysql/") already. Didn't work.

HALP!

+1  A: 
  1. check that file exists and no permissions problem by inserting #include with full name at the beginning of clsql_mysql.c file:

    #include "/usr/local/mysql/include/mysql/mysql.h"

  2. if compiles well - undo changes and resolve path provided by -I parameter

  3. if doesn't compile and says "file does'nt exist" - check that file exists and no permission problems

noonex
A: 

I'm not familiar with CLSQL specifically, but if it uses cffi-grovel to generate that command, then prior to loading it you should try adding your "-I/usr/local/mysql/include/mysql/" to the cffi-grovel::*cc-flags* list. You could also add it in the asd file, as the grovel-file asdf component takes an optional cc-flags argument.

kwatford
A: 

Thanks for the quick responses! I'll try these solutions tomorrow.