EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Tools (https://www.eqemulator.org/forums/forumdisplay.php?f=593)
-   -   Compiler question (https://www.eqemulator.org/forums/showthread.php?t=24021)

a_troll_01 12-27-2007 12:28 AM

Compiler question
 
I haven't done any C/C++ development in years and so I'm looking for a good free or open source Windows compiler that can be used to build EMU. Any suggestions?

BTW - I downloaded the Microsoft 2008 Express compiler and it puked all over a redef of vsprintf. I really don't want to have to fiddle with #define statements each time there is a new EMU release.

Thanks

sfisque 12-27-2007 05:03 AM

well, since eqemu builds with gcc, you could try installing cygwin (if you dont already have it) and maybe building using its gcc. not sure if it will explode, but worthy of an attempt if you're sold on windows.

== sfisque

a_troll_01 12-28-2007 02:12 AM

I tracked down the issue and it appears to be one of symantics. The EMU projects references the functions _snprintf & _vsnprintf and MSC uses _snprintf_c & _vsnprintf_c.

So I made the following change:
#ifdef WIN32
#ifdef _MSC_VER
#define snprintf _snprintf_c
#define vsnprintf _vsnprintf_c
#else
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#endif

I do have a question about the project structure. Why do we redefine snprintf & vsnprintf in the source so many times? Seems to me it would have be more appropriate to define it once in types.h and then include types.h where needed.


All times are GMT -4. The time now is 05:50 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.