Page 1 of 1

Linux Compile Error - DatabaseNew.o

Posted: Wed Apr 04, 2012 12:00 pm
by John Adams
~burp~ Shakes fist at Scatman! :mrgreen:

Code: Select all

eq2dev@eq2dev:~/src/EQ2/source/WorldServer$ make
g++ -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual  -Wcomment -Wcast-align -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DEQ2 -DWORLD -I/usr/include/mysql -I/usr/mysql/include -I./LUA/include ../common/Condition.cpp -o ../common/Condition.o
g++ -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual  -Wcomment -Wcast-align -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DEQ2 -DWORLD -I/usr/include/mysql -I/usr/mysql/include -I./LUA/include ../common/ConfigReader.cpp -o ../common/ConfigReader.o
g++ -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual  -Wcomment -Wcast-align -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DEQ2 -DWORLD -I/usr/include/mysql -I/usr/mysql/include -I./LUA/include ../common/CRC16.cpp -o ../common/CRC16.o
g++ -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual  -Wcomment -Wcast-align -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DEQ2 -DWORLD -I/usr/include/mysql -I/usr/mysql/include -I./LUA/include ../common/Crypto.cpp -o ../common/Crypto.o
g++ -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual  -Wcomment -Wcast-align -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DEQ2 -DWORLD -I/usr/include/mysql -I/usr/mysql/include -I./LUA/include ../common/DatabaseNew.cpp -o ../common/DatabaseNew.o
In file included from ../common/DatabaseNew.h:4,
                 from ../common/DatabaseNew.cpp:4:
../common/DatabaseResult.h:5:78: error: WinSock.h: No such file or directory
../common/DatabaseNew.cpp: In member function âbool DatabaseNew::Connect()â:
../common/DatabaseNew.cpp:34: error: âmemsetâ was not declared in this scope
../common/DatabaseNew.cpp:44: error: âstrnicmpâ was not declared in this scope
../common/DatabaseNew.cpp:48: error: âstrtokâ was not declared in this scope
../common/DatabaseNew.cpp:50: error: âstrnicmpâ was not declared in this scope
../common/DatabaseNew.cpp:51: error: âstrncpyâ was not declared in this scope
../common/DatabaseNew.cpp:53: error: âstrncpyâ was not declared in this scope
../common/DatabaseNew.cpp:55: error: âstrncpyâ was not declared in this scope
../common/DatabaseNew.cpp:57: error: âstrncpyâ was not declared in this scope
../common/DatabaseNew.cpp: In member function âbool DatabaseNew::Query(const char*, ...)â:
../common/DatabaseNew.cpp:107: warning: format â%luâ expects type âlong unsigned intâ, but argument 3 has type âsize_tâ
../common/DatabaseNew.cpp: In member function âbool DatabaseNew::Select(DatabaseResult*, const char*, ...)â:
../common/DatabaseNew.cpp:144: warning: format â%luâ expects type âlong unsigned intâ, but argument 3 has type âsize_tâ
make: *** [../common/DatabaseNew.o] Error 1
I could fix this, but wanted you to see before I hack something to bits.

Re: Linux Compile Error - DatabaseNew.o

Posted: Wed Apr 04, 2012 8:02 pm
by Scatman
Crap, looks like we just need a #include <string.h>. Just guessing but I can try to tomorrow (thu) if no one else gets to it.

Edit:
I noticed WinSock was not found. That should be wrapped in a #ifdef _WIN32

Re: Linux Compile Error - DatabaseNew.o

Posted: Wed Apr 04, 2012 9:16 pm
by John Adams
Scatman wrote:Crap, looks like we just need a #include <string.h>. Just guessing but I can try to tomorrow (thu) if no one else gets to it.

Edit:
I noticed WinSock was not found. That should be wrapped in a #ifdef _WIN32
I'll try the #include now. And I already added the #ifdef, and that's where I failed. I did #ifdef WIN32 only :)

Thanks!


Edit: Newp, still shittin' da bed.

Code: Select all

eq2dev@eq2dev:~/src/EQ2/source/WorldServer$ make
g++ -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual  -Wcomment -Wcast-align -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DEQ2 -DWORLD -I/usr/include/mysql -I/usr/mysql/include -I./LUA/include ../common/DatabaseNew.cpp -o ../common/DatabaseNew.o
../common/DatabaseNew.cpp: In member function âbool DatabaseNew::Connect()â:
../common/DatabaseNew.cpp:45: error: âstrnicmpâ was not declared in this scope
../common/DatabaseNew.cpp:51: error: âstrnicmpâ was not declared in this scope
../common/DatabaseNew.cpp: In member function âbool DatabaseNew::Query(const char*, ...)â:
../common/DatabaseNew.cpp:108: warning: format â%luâ expects type âlong unsigned intâ, but argument 3 has type âsize_tâ
../common/DatabaseNew.cpp: In member function âbool DatabaseNew::Select(DatabaseResult*, const char*, ...)â:
../common/DatabaseNew.cpp:145: warning: format â%luâ expects type âlong unsigned intâ, but argument 3 has type âsize_tâ
make: *** [../common/DatabaseNew.o] Error 1
I put #include <string.h> in ../common/DatabaseNew.cpp

Re: Linux Compile Error - DatabaseNew.o

Posted: Thu Apr 05, 2012 4:59 am
by Scatman
Fixed and committed.

Re: Linux Compile Error - DatabaseNew.o

Posted: Thu Apr 05, 2012 11:03 am
by John Adams
Works! Thanks, dood.