Jump to content
  • Advertisement
Sign in to follow this  

SqPlus woes!

This topic is 4485 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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[]) {
  SquirrelObject helloWorld = SquirrelVM::CompileBuffer(_T("print(\"Hello World\");"));
  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!

Share this post

Link to post
Share on other sites
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"
#define LIB ".lib"

#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)

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.

Share this post

Link to post
Share on other sites
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!

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!