logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Problems with compiling

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
Undie



Joined: 05 Jan 2005
Posts: 1

PostPosted: Wed Jan 05, 2005 21:51    Post subject: Problems with compiling Reply with quote

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
View user's profile Send private message
Manuel



Joined: 30 Dec 2004
Posts: 51

PostPosted: Thu Jan 06, 2005 1:02    Post subject: Reply with quote

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
View user's profile Send private message
JeroenB



Joined: 31 Dec 2004
Posts: 228
Location: Netherlands

PostPosted: Thu Jan 06, 2005 12:15    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
DarkstarsDad



Joined: 17 Jan 2005
Posts: 59
Location: Overland Park, Kansas USA

PostPosted: Mon Jan 24, 2005 12:17    Post subject: need mysql-devel Reply with quote

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
View user's profile Send private message
Tone Eternal



Joined: 06 Mar 2005
Posts: 5

PostPosted: Sun Mar 06, 2005 18:12    Post subject: Reply with quote

isnt there a yum command for this? does anybody know it?
Back to top
View user's profile Send private message
Tone Eternal



Joined: 06 Mar 2005
Posts: 5

PostPosted: Sun Mar 06, 2005 18:16    Post subject: Reply with quote

I use Fedora Core 2.0 and I didnt see anything for my distro on that site, can anyone help me?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group