From b097bde797789dbb776aac642f2fd9f8c07ab3c8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Feb 2009 15:10:39 +0000 Subject: [PATCH] Works under windows with ECL-8.12.0 --- SConstruct | 8 ++++---- SConstruct.Win32 | 13 ++++++++----- src/App.cpp | 7 +++---- src/main.cpp | 8 ++++++-- 4 files changed, 21 insertions(+), 15 deletions(-) diff --git a/SConstruct b/SConstruct index 664183a..e6d6c76 100644 --- a/SConstruct +++ b/SConstruct @@ -1,8 +1,8 @@ VariantDir('build', 'src', duplicate=0) env=Environment() -env.Append(CPPPATH = [r"D:\Experiments\G3D-7.00\include", r"D:\Experiments\ecl\msvc" ]) -env.Append(LIBPATH = [r"D:\Experiments\G3D-7.00\lib", "D:\Experiments\ecl\msvc" ]) +env.Append(CPPPATH = [r"D:\Experiments\G3D\build\win-i386-vc8.0\include", r"D:\Experiments\ecl\ecl-0.9l\msvc" ]) +env.Append(LIBPATH = [r"D:\Experiments\G3D\build\win-i386-vc8.0\lib", "D:\Experiments\ecl\ecl-0.9l\msvc" ]) env.Append(LINKFLAGS = [ r"/SUBSYSTEM:CONSOLE", r"/DEBUG" ]) -env.Append(LIBS = [r"ecl", r"GLG3D", r"G3D" ]) -env.Append(CXXFLAGS = "/EHsc /Od") +env.Append(LIBS = [r"ecl", r"GLG3Dd", r"G3Dd" ]) +env.Append(CXXFLAGS = "/EHsc /Od /MD /Z7") env.Program("Testbed", [ r"build/App.cpp", r"build/Entity.cpp", r"build/main.cpp", r"build/Turtle.cpp", r"build/TextShape.cpp" ] ) diff --git a/SConstruct.Win32 b/SConstruct.Win32 index d77c912..4e2e734 100644 --- a/SConstruct.Win32 +++ b/SConstruct.Win32 @@ -1,8 +1,11 @@ VariantDir('build', 'src', duplicate=0) env=Environment() -env.Append(CPPPATH = [r"D:\Experiments\G3D-7.00\include", r"D:\Experiments\ecl\msvc" ]) -env.Append(LIBPATH = [r"D:\Experiments\G3D-7.00\lib", "D:\Experiments\ecl\msvc" ]) -env.Append(LINKFLAGS = [ r"/SUBSYSTEM:CONSOLE", r"/DEBUG" ]) -env.Append(LIBS = [r"ecl," r"GLG3Dd", r"G3Dd" ]) -env.Append(CXXFLAGS = "/EHsc /Od") +env.Append(CPPPATH = [r"D:\Experiments\G3D\G3D.lib\include", + r"D:\Experiments\G3D\GLG3D.lib\include", + r"D:\Experiments\ecl-8.12.0\msvc" ]) +env.Append(LIBPATH = [r"D:\Experiments\G3D\build\win-i386-vc8.0\lib", "D:\Experiments\ecl-8.12.0\msvc" ]) +env.Append(LINKFLAGS = [ r"/SUBSYSTEM:CONSOLE", r"/DEBUG" ]) +env.Append(CPPDEFINES = [ r"_DEBUG", r"ECL_THREADS", r"ECL_DEBUG"]) +env.Append(LIBS = [r"ecl", r"GLG3Dd", r"G3Dd" ]) +env.Append(CXXFLAGS = "/EHsc /Od /MDd /Z7") env.Program("Testbed", [ r"build/AMCFile.cpp", r"build/AMCNode.cpp", r"build/App.cpp", r"build/Entity.cpp", r"build/main.cpp", r"build/Turtle.cpp", r"build/TextShape.cpp" ] ) diff --git a/src/App.cpp b/src/App.cpp index 678006c..f88370e 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -14,7 +14,7 @@ extern cl_object safeRead(const std::string& strCmd); App::App(const GApp::Settings& settings) : GApp(settings) { // Uncomment the next line if you are running under a debugger: - // catchCommonExceptions = false; + //catchCommonExceptions = false; // Uncomment the next line to hide the developer tools: developerWindow->setVisible(true); @@ -94,8 +94,8 @@ void App::onGraphics(RenderDevice* rd, Array& posed3D, ArrayonGraphics(rd); - Draw::sphere(Sphere(Vector3::zero(), 0.5f), rd, Color3::white()); - Draw::box(AABox(Vector3(-3,-0.5,-0.5), Vector3(-2,0.5,0.5)), rd, Color3::green()); + //Draw::sphere(Sphere(Vector3::zero(), 0.5f), rd, Color3::white()); + //Draw::box(AABox(Vector3(-3,-0.5,-0.5), Vector3(-2,0.5,0.5)), rd, Color3::green()); Entity::renderEntities( rd ); @@ -181,7 +181,6 @@ void App::printConsoleHelp() { console->printf("help - Display this text\n\n"); console->printf("~/ESC - Open/Close console\n"); console->printf("F2 - Enable first-person camera control\n"); - console->printf("Load - Load AMC/ASF"); } void App::onCleanup() { diff --git a/src/main.cpp b/src/main.cpp index c122c2e..b37eab7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -87,8 +87,10 @@ int main(int argc, char** argv) { GApp::Settings settings; cl_boot(argc, argv); - const char *handler = "#.(lambda (str env err-value) (multiple-value-list (catch 'si::protect-tag (let* ((*debugger-hook* #'(lambda (condition old-hooks) (throw 'si::protect-tag condition)))) (si::eval-with-env (read-from-string str) env)))))"; + const char *handler = "#.(lambda (str env err-value) (catch 'si::protect-tag (let* ((*debugger-hook* #'(lambda (condition old-hooks) (throw 'si::protect-tag condition)))) (si::eval-with-env (read-from-string str) env))))"; + + ecl_register_static_root(&g_eval_handler); g_eval_handler = c_string_to_object(handler); @@ -144,7 +146,9 @@ int main(int argc, char** argv) { cl_def_c_function(symbol("SET-ENTITY-SOLID-COLOUR"), (void*) cl_set_entity_solid_color, 5); - + + + g_theApp = new App(settings); g_theApp->run(); delete g_theApp; -- 2.11.4.GIT