steve3d Posted December 9, 2010 Share Posted December 9, 2010 I need to add some objects in engine, so I changed SConstruct to following g_env.Append(CPPFLAGS = Split('/EHsc /W3 /wd4355 /wd4250 /fp:precise')) g_env.Append(LINKFLAGS = Split('/fixed:no /nodefaultlib:libcmt /incremental:no')) # debugging if g_debug: g_env.Append(CPPFLAGS = Split('/Zi')) g_env.Append(LINKFLAGS = Split('/debug')) else: g_env.Append(CPPFLAGS = Split('/Oxisy /Ob2 /GFAT')) g_env.Append(CPPDEFINES = Split('NDEBUG')) this will allow me to build a engine version without any optimization, that will be much easier for debugging, but using lastest version of unigine, it always crash at start, if I use unmodified SConstruct file, everything works. BUT, with these optimization, how can I debug a program??? all values of variables are invisible... Link to comment
binstream Posted December 9, 2010 Share Posted December 9, 2010 Please take a look at output of scons run (both STDOUT and STDERR), usually it prints errors. Link to comment
steve3d Posted December 9, 2010 Author Share Posted December 9, 2010 I changed it to these g_env.Append(LINKFLAGS = Split('/fixed:no /nodefaultlib:libcmt /incremental:no')) # debugging if g_debug: g_env.Append(CPPFLAGS = Split('/Zi')) g_env.Append(LINKFLAGS = Split('/debug')) else: g_env.Append(CPPDEFINES = Split('NDEBUG')) then it works Link to comment
steve3d Posted December 13, 2010 Author Share Posted December 13, 2010 got the problem, the default stack size for debug version is too small, so it always stack overflow. change the debug link flags to this: g_env.Append(LINKFLAGS = Split('/debug /stack:2097152')) Link to comment
Recommended Posts