I changed this to /Applications/Mathematica\ 5.0.app/AddOns/Applications
VERSION = 0.2
DDIR = mysql-mlink-${VERSION}
MPREP = mprep
When I try to compile by typing "make", I get the following error:
mysqltm.c:15:22: mathlink.h: No such file or directory
By using 'locate mathlink.h' I know that this file is in /Applications/Mathematica 5.0.app/AddOns/MathLink/DeveloperKit/Darwin/CompilerAdditions/mathlink.h
My question is, where in the makefile do I put that directory?
This may be a very basic cuestion, but this is the first time I edit a makefile.
Regards,
Gustavo Delfino
Caracas, Venezuela
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have copied all the files from the /Applications/Mathematica 5.0.app/AddOns/MathLink/DeveloperKit/Darwin/CompilerAdditions/ into the mysql-mlink-0.2 directory. I think I am much closer now to compile it. However, I think that there is still one more file needed, but I don't even know which one it is. This is what I am getting:
~/Desktop/mysql-mlink-0.2 gdelfino$ make
cc -I/usr/local/mysql/include -c mysqltm.c
In file included from mysqltm.c:15:
mathlink.h:1845: warning: use of `long double' type; its size may change in a future release
mathlink.h:1845: warning: (Long double usage is reported only once for each file.
mathlink.h:1845: warning: To disable this warning, use -Wno-long-double.)
cc -I/usr/local/mysql/include -c mysql.c
In file included from mysql.c:7:
mathlink.h:1845: warning: use of `long double' type; its size may change in a future release
mathlink.h:1845: warning: (Long double usage is reported only once for each file.
mathlink.h:1845: warning: To disable this warning, use -Wno-long-double.)
mysql.c: In function `sqlconnect':
mysql.c:69: warning: passing arg 2 of `mlerror' discards qualifiers from pointer target type
mysql.c: In function `sqlquery':
mysql.c:99: warning: passing arg 2 of `mlerror' discards qualifiers from pointer target type
mysql.c: In function `sqlprepare':
mysql.c:112: warning: passing arg 2 of `mlerror' discards qualifiers from pointer target type
cc mysqltm.o mysql.o -L/usr/local/mysql/lib -lML -lmysqlclient -lm -o mysql.ml
ld: can't locate file for: -lML
make: *** [mysql.ml] Error 1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The original makefile has the following variables in it:
SYS = Linux
Should I change this to MacOSX? This is what $OperatingSystem returns in MMA.
INCDIR = /usr/include/mysql
I changed this to /usr/local/mysql/include
LIBDIR = /usr/lib/mysql
I changed this to /usr/local/mysql/lib
BINDIR = /home/stefan/.Mathematica/4.1/AddOns/Applications
I changed this to /Applications/Mathematica\ 5.0.app/AddOns/Applications
VERSION = 0.2
DDIR = mysql-mlink-${VERSION}
MPREP = mprep
When I try to compile by typing "make", I get the following error:
mysqltm.c:15:22: mathlink.h: No such file or directory
By using 'locate mathlink.h' I know that this file is in /Applications/Mathematica 5.0.app/AddOns/MathLink/DeveloperKit/Darwin/CompilerAdditions/mathlink.h
My question is, where in the makefile do I put that directory?
This may be a very basic cuestion, but this is the first time I edit a makefile.
Regards,
Gustavo Delfino
Caracas, Venezuela
I have copied all the files from the /Applications/Mathematica 5.0.app/AddOns/MathLink/DeveloperKit/Darwin/CompilerAdditions/ into the mysql-mlink-0.2 directory. I think I am much closer now to compile it. However, I think that there is still one more file needed, but I don't even know which one it is. This is what I am getting:
~/Desktop/mysql-mlink-0.2 gdelfino$ make
cc -I/usr/local/mysql/include -c mysqltm.c
In file included from mysqltm.c:15:
mathlink.h:1845: warning: use of `long double' type; its size may change in a future release
mathlink.h:1845: warning: (Long double usage is reported only once for each file.
mathlink.h:1845: warning: To disable this warning, use -Wno-long-double.)
cc -I/usr/local/mysql/include -c mysql.c
In file included from mysql.c:7:
mathlink.h:1845: warning: use of `long double' type; its size may change in a future release
mathlink.h:1845: warning: (Long double usage is reported only once for each file.
mathlink.h:1845: warning: To disable this warning, use -Wno-long-double.)
mysql.c: In function `sqlconnect':
mysql.c:69: warning: passing arg 2 of `mlerror' discards qualifiers from pointer target type
mysql.c: In function `sqlquery':
mysql.c:99: warning: passing arg 2 of `mlerror' discards qualifiers from pointer target type
mysql.c: In function `sqlprepare':
mysql.c:112: warning: passing arg 2 of `mlerror' discards qualifiers from pointer target type
cc mysqltm.o mysql.o -L/usr/local/mysql/lib -lML -lmysqlclient -lm -o mysql.ml
ld: can't locate file for: -lML
make: *** [mysql.ml] Error 1