From where you say the problem is you must be compiling with MSVC or Borland C; I have no idea if Code::Blocks accepts patches to Code::Blocks for building under anything but GCC.
But, I think that you need to post an patch file instead of code snippets to proceed. Also, good idea to say what problem is being fixed.
@thomas here's an patch that adds the code that is missing; it should only be complied by MSVC or Borland C, so would not normally affect CodeBlocks.
Index: src/include/scripting/sqplus/sqplus.h
===================================================================
--- src/include/scripting/sqplus/sqplus.h (revision 5295)
+++ src/include/scripting/sqplus/sqplus.h (working copy)
@@ -32,6 +32,7 @@
#define SCSNPRINTF _snwprintf
#define SCPUTS _putws
#endif
+ #define sqT(n) n
#else
// C::B patch: Convert conflicting _T() to sqT() --> applies to nearly *all* files!
// #define _T(n) n
Tim S
sqplus.h
#if defined(_MSC_VER) || defined(__BORLANDC__)
#include <tchar.h>
#ifndef UNICODE
#define SCSNPRINTF _snprintf
#define SCPUTS puts
#else
#define SCSNPRINTF _snwprintf
#define SCPUTS _putws
#endif
#ifdef _UNICODE
#define sqT(n) _T(n)
#else
#define sqT(n) (n)
#endif
#else
// C::B patch: Convert conflicting _T() to sqT() --> applies to nearly *all* files!
// #define _T(n) n
#define sqT(n) n
#define SCSNPRINTF snprintf
#include <stdio.h> // for snprintf
#define SCPUTS puts
#endif
sqstdio.h
SQFILE sqstd_fopen(const SQChar *filename ,const SQChar *mode)
{
// C::B patch: Comment out Unicode stuff
#ifndef SQUNICODE
return (SQFILE)fopen(filename,mode);
#else
return (SQFILE)_wfopen(filename,mode);
#endif
}
squirrel.h
// C::B patch: Comment out Unicode stuff
#ifdef _UNICODE
#define SQUNICODE
#endif
ya, I now try move codeblocks source into vs2005,so I get some trouble.
I choose unicode in vs2005, I get more errors in libsqplus and libsqstdlib
but I try compiling codeblocks code for mingw and got some error for fix code.
sorry, forgot this post.Thx