View previous topic :: View next topic |
Author |
Message |
Undie
Joined: 05 Jan 2005 Posts: 1
|
Posted: Wed Jan 05, 2005 21:51 Post subject: Problems with compiling |
|
|
Hi !
I get this error when trying to compile:
g++ -mcpu=i386 -c -o nwnx2lib.o nwnx2lib.cpp
g++ -mcpu=i386 -c -o NWNXBase.o NWNXBase.cpp
g++ -mcpu=i386 -c -o gline.o gline.cpp
g++ -w -fPIC -shared -W -Wall -o nwnx2.so nwnx2lib.o NWNXBase.o gline.o -ldl -DHAVE_CONFIG_H
make -C db
make[1]: Entering directory `/home/server/linnwnx2/db'
g++ -mcpu=i386 -I.. -c -o NWNXmysql.o NWNXmysql.cpp
In file included from NWNXmysql.h:17,
from NWNXmysql.cpp:20:
../db/dbmysql.h:27:25: mysql/mysql.h: No such file or directory
In file included from NWNXmysql.h:17,
from NWNXmysql.cpp:20:
../db/dbmysql.h:40: 'MYSQL' is used as a type, but is not defined as a type.
../db/dbmysql.h:41: syntax error before `*' token
make[1]: *** [NWNXmysql.o] Error 1
make[1]: Leaving directory `/home/server/linnwnx2/db'
make: *** [db] Error 2
The README file says it searches for mysql in /usr/lib/mysql
.. my path is /usr/local/mysql .. i dont really know how to make it search elsewhere .. there is no prefix avalible in the configure line ..
This may not even be the problem .. i have no ideá .. was hoping you guys could help me out !
EDIT: I made my mysql installation from source .. and alot of answers to this questions have been that the devel version is needed .. I might be wrong here, but doesnt the sourceball contain all the packages ? And im sure that there is no such option in the configure line ! |
|
Back to top |
|
|
Manuel
Joined: 30 Dec 2004 Posts: 51
|
Posted: Thu Jan 06, 2005 1:02 Post subject: |
|
|
Yeah, it definately looks like it can't find the mysql header file. Not the answer you want to hear, I'm sure, but you might make a sym link to the header file in the directory the compiler is looking in. |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Thu Jan 06, 2005 12:15 Post subject: |
|
|
If I am not mistaken you can create an environmental variable CPP_FLAGS or something similar and supply it with -L/usr/local/mysql/include :
Code: | export CPP_FLAGS=-L/usr/local/mysql/include |
And then call make again. I am no linux guroo, so make sure there is a include directory in your mysql library. I am also not entirely sure if the -L must be used or another one. |
|
Back to top |
|
|
DarkstarsDad
Joined: 17 Jan 2005 Posts: 59 Location: Overland Park, Kansas USA
|
Posted: Mon Jan 24, 2005 12:17 Post subject: need mysql-devel |
|
|
You need to install the developer files for mysql.. the rpm is avail at mysql site. I had trouble with this also i found the best version to use is the rpm from mysql site for the db and all include files. dont forget to install the client side apps also. heres the site link.
http://dev.mysql.com/downloads/mysql/4.1.html
scroll down to the x86 rpm downloads
************************************************************
Heres what to do before the ./configure make install
You can edit the address before you ./configure it.
In the linnwnx2/db folder select the Makefile.in and open in your favorite editor.
Scroll down to the libs=@libs@ -L /dir/to/your/mysql -lmysqlclient -lz
save and exit Deleat the backup makefile (if your editor makes one).
Then ./configure like normal and it should find the custom location you put the mysql in.
Hope this helps someone. |
|
Back to top |
|
|
Tone Eternal
Joined: 06 Mar 2005 Posts: 5
|
Posted: Sun Mar 06, 2005 18:12 Post subject: |
|
|
isnt there a yum command for this? does anybody know it? |
|
Back to top |
|
|
Tone Eternal
Joined: 06 Mar 2005 Posts: 5
|
Posted: Sun Mar 06, 2005 18:16 Post subject: |
|
|
I use Fedora Core 2.0 and I didnt see anything for my distro on that site, can anyone help me? |
|
Back to top |
|
|
|