Page 1 of 2

<--- Noob Windows Compile Question

Posted: Sun Dec 07, 2008 4:43 am
by Scatman
I'm getting a compile error when compiling the source and I have no idea how to fix it. Anyone have any ideas?

Code: Select all

C:\Documents and Settings\Scott\Desktop\EQ2Emu Source\World>make all
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 ../comm
on/timer.cpp -o ../common/timer.o
g++: unrecognized option `-pthread'
In file included from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstring:51,
                 from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/char_traits.h:45,
                 from /usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/string:47,
                 from ../common/../common/../common/../common/types.h:23,
                 from ../common/../common/../common/Mutex.h:29,
                 from ../common/../common/debug.h:65,
                 from ../common/timer.cpp:20:
../common/../common/../common/../common/unix.h:32: error: previous declaration of `char* strlwr(char*)' with C++ linkage
/usr/include/string.h:74: error: conflicts with new declaration with C linkage
../common/../common/../common/../common/unix.h:31: error: previous declaration of `char* strupr(char*)' with C++ linkage
/usr/include/string.h:75: error: conflicts with new declaration with C linkage
make: *** [../common/timer.o] Error 1

Posted: Sun Dec 07, 2008 7:38 am
by LethalEncounter
That is odd, have you tried doing a make clean first?

Posted: Sun Dec 07, 2008 8:56 am
by Scatman
Ya I always try a make clean first.

Posted: Sun Dec 07, 2008 9:28 am
by LethalEncounter
oh wait, this is for Windows. Guess I should have read the title :P That makefile is for Linux compiles, for Windows use VS .Net.

Posted: Sun Dec 07, 2008 9:31 am
by Scatman
Oh, duh. Just open World.vcproj and build it right?

Posted: Sun Dec 07, 2008 9:34 am
by LethalEncounter
Use the solution (sln file), but otherwise yup.

Posted: Sun Dec 07, 2008 9:43 am
by Scatman
Cool thanks. Do you know where I can get zlib.h and errmsg.h? Seems the build can't find those files. Tried to Google them but I can't seem to find the actual files.

Posted: Sun Dec 07, 2008 10:33 am
by Bion
scatman the zlib.h can be found http://www.zlib.net/zlib-1.2.3.tar.gz
as for the errmsg.h i am not sure is that a mysql dependency mysql source can be found http://dev.mysql.com/downloads/mysql/5.1.html
you got to put the include dir for those 2 programs into the project additional include path for both release and debug if you use both of them

Posted: Sun Dec 07, 2008 11:01 am
by Scatman
Thanks. :)

Posted: Sun Dec 07, 2008 11:02 am
by John Adams
~shakes head~
Oh, Scatman. What a JA move that was.
http://www.eq2emulator.net/forums/viewtopic.php?t=100
;)

Posted: Sun Dec 07, 2008 11:07 am
by Scatman
Doh! I even tried searching the forums too. I guess I'm not the uber "googler" I thought I was.

Posted: Sun Dec 07, 2008 11:09 am
by John Adams
Taught you everything I know!! ;)
Cool, now that you can compile too, we can gang up and make LE's life even more meaningful.

Posted: Sun Dec 07, 2008 11:11 am
by Scatman
Poor LE.

Posted: Sun Dec 07, 2008 3:09 pm
by Zcoretri
Been compiling my own exe's for awhile. Using VC++ express 2008 though.

Posted: Mon Dec 08, 2008 2:49 am
by Scatman
Ok I'm getting past a lot of my old issues thanks to you guys and John, but now I'm running into this. I'm trying to compile debug.

Code: Select all

Error	1	error LNK2005: _malloc already defined in LIBCMTD.lib(dbgheap.obj)	MSVCRT.lib	
Error	2	error LNK2005: _free already defined in LIBCMTD.lib(dbgheap.obj)	MSVCRT.lib	
Error	3	error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)	MSVCRT.lib	
Error	4	error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMTD.lib(typinfo.obj)	MSVCRT.lib	
Warning	5	warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library	World	
Error	6	fatal error LNK1169: one or more multiply defined symbols found	c:\Documents and Settings\Scott\Desktop\EQ2Emu Source\build\EQ2WorldDebug.exe	1	
I tried to add MSVCRT into the ignored libraries just like how release has it, but ended up getting a whole bunch of errors. Any takers?