Skip to main content
GameDev.net gamedev.net
🔒 Locked

SqPlus woes!

Started by Silvo Jun 9, 2006 at 9:27 PM 1 replies 650+ views
Original Post
Silvo
Silvo
Ok, after a large loop ive come back to Squirrel and SqPlus with VC++ 2005. The giant solution compiled and executed fine, but when I did it myself I get a problem with (it seems to be) sqobject.h my source (main.cpp):

#include "sqplus.h"

using namespace SqPlus;

#pragma comment(lib, "squirrelD.lib")
#pragma comment(lib, "sqstdlibD.lib")
#pragma comment(lib, "sqdbglibD.lib")
#pragma comment(lib, "sqplusD.lib")


int main(int argc,char * argv[]) {
  SquirrelVM::Init();
  SquirrelObject helloWorld = SquirrelVM::CompileBuffer(_T("print(\"Hello World\");"));
  SquirrelVM::RunScript(helloWorld);
  SquirrelVM::Shutdown();
  return 0;
} // main




Im getting this error: "this application has requested the Runtime to terminate in an unusual way. Please contact the application's support team for more information" Unfortunatly I am the support team... when stepping through with the debugger, i get an unhandled exception in SquirrelVM.cpp ln 133 (should be throw statement ln 131) which i can skip, and an access violation in sqobject.h ln 146 which i cannot continue past. What is this and how do i fix it?? Thanks!
John Schultz
John Schultz
Are you compiling for Release, Debug, UNICODE? Make sure your project settings match the project settings for MinimalSqPlus. It would also be a good idea to use something like:

#define SQ_REL_PATH "../"#ifdef UNICODE#define LIB  "U.lib"#else#define LIB  ".lib"#endif#ifdef _DEBUG#pragma comment(lib,SQ_REL_PATH "lib/squirrelD" LIB)#pragma comment(lib,SQ_REL_PATH "lib/sqstdlibD" LIB)#pragma comment(lib,SQ_REL_PATH "lib/sqplusD" LIB)#else // Release#pragma comment(lib,SQ_REL_PATH "lib/squirrel" LIB)#pragma comment(lib,SQ_REL_PATH "lib/sqstdlib" LIB)#pragma comment(lib,SQ_REL_PATH "lib/sqplus" LIB)#endif


so that you get the correct libs depending on your current build (Release, Debug, UNICODE, etc.). Note that you don't need sqdbglib*.lib unless you are using the remote debugger.

Build the 'giant' solution, then build minimalSqPlus (set as the Startup Project). It should run fine with no issues.
Silvo
Silvo
thanks, I didnt realise it was in unicode, but when i changed the #pragmas, it went looking for them and couldnt find them, so i had to change the project out of unicode. Now it works fine, thanks again!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.