1
0
forked from 0ad/0ad

Use the correct JS lib for Debug/Release.

Errors are now also reported through debug_out to reduce the chance of
missing them.

This was SVN commit r640.
This commit is contained in:
Ykkrosh 2004-07-07 10:52:45 +00:00
parent f55e9a72bd
commit eb530b7d94
2 changed files with 10 additions and 4 deletions

View File

@ -14,7 +14,11 @@
# define finite __finite // PT: Need to use _finite in MSVC, __finite in gcc # define finite __finite // PT: Need to use _finite in MSVC, __finite in gcc
#endif #endif
#ifdef NDEBUG
# pragma comment (lib, "js32.lib") # pragma comment (lib, "js32.lib")
#else
# pragma comment (lib, "js32d.lib")
#endif
extern CConsole* g_Console; extern CConsole* g_Console;
@ -310,6 +314,8 @@ double ScriptingHost::ValueToDouble(const jsval value)
void ScriptingHost::ErrorReporter(JSContext * context, const char * message, JSErrorReport * report) void ScriptingHost::ErrorReporter(JSContext * context, const char * message, JSErrorReport * report)
{ {
debug_out("%s(%d) : %s\n", report->filename, report->lineno, message);
if (g_Console) if (g_Console)
{ {
g_Console->InsertMessage( L"%S ( %d )", report->filename, report->lineno ); g_Console->InsertMessage( L"%S ( %d )", report->filename, report->lineno );