Squirrel

The programming language
Welcome to Squirrel Sign in | Join | Help
in Search

compiling sqplus error

Last post 05-25-2008, 1:58 AM by ats. 6 replies.
Sort Posts: Previous Next
  •  05-05-2008, 5:14 AM 2484

    compiling sqplus error

    Hi ,

    I am able to compile everything from the sqplus zip package except sqplus and minimalsqplus. I am using codeblocks with mingw compiler. Even after setting the include path to include and squirrel directory, the problem is there. How can I correct the problem?

    ..\sqplus\SquirrelObject.h||In member function `_ty SquirrelObject::Get()':|

    ..\sqplus\SquirrelObject.h|102|error: incomplete type `SquirrelVM' used in nested name specifier|

     

     

  •  05-24-2008, 1:59 AM 2529 in reply to 2484

    Re: compiling sqplus error

    I still haven't got sqplus compiled. Pls help.
  •  05-24-2008, 3:38 AM 2532 in reply to 2529

    Re: compiling sqplus error

    You have to provide some more info:

    1 - What version of Squirrel/SqPlus are you using?

    2 - Which compiler?

    Without that, not much can be said.

    Regards
    // ATS.
  •  05-24-2008, 6:52 AM 2533 in reply to 2484

    Re: compiling sqplus error

    Thanks. This is the makefile from DEVC++ in winXP. I tried both codeblocks and devcpp. They are giving the same error. Hope posting this long makefile is  OK.

    # Project: sqplus
    # Compiler: Default GCC compiler
    # Compiler Type: MingW 3
    # Makefile created by wxDev-C++ 6.10.2 on 25/05/08 07:16

    CPP       = g++.exe
    CC        = gcc.exe
    WINDRES   = windres.exe
    OBJ       = Objects/MingW/SquirrelVM.o Objects/MingW/zSqPlus.o Objects/MingW/SquirrelBindingsUtils.o Objects/MingW/SquirrelBindingsUtilsWin32.o Objects/MingW/SquirrelObject.o
    LINKOBJ   = Objects/MingW/SquirrelVM.o Objects/MingW/zSqPlus.o Objects/MingW/SquirrelBindingsUtils.o Objects/MingW/SquirrelBindingsUtilsWin32.o Objects/MingW/SquirrelObject.o
    LIBS      = -L"C:/Dev-Cpp/Lib" 
    INCS      = -I"include" -I"D:/CD-SQUIRREL/SQUIRREL2_1_1_sqplus_25/include" -I"D:/CD-SQUIRREL/SQUIRREL2_1_1_sqplus_25/sqplus" -I"D:/CD-SQUIRREL/SQUIRREL2_1_1_sqplus_25/sqstdlib"
    CXXINCS   = -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" -I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -I"C:/Dev-Cpp/" -I"C:/Dev-Cpp/include/common/wx/msw" -I"C:/Dev-Cpp/include/common/wx/generic" -I"C:/Dev-Cpp/include/common/wx/fl" -I"C:/Dev-Cpp/include/common/wx/gizmos" -I"C:/Dev-Cpp/include/common/wx/html" -I"C:/Dev-Cpp/include/common/wx/mmedia" -I"C:/Dev-Cpp/include/common/wx/net" -I"C:/Dev-Cpp/include/common/wx/ogl" -I"C:/Dev-Cpp/include/common/wx/plot" -I"C:/Dev-Cpp/include/common/wx/protocol" -I"C:/Dev-Cpp/include/common/wx/stc" -I"C:/Dev-Cpp/include/common/wx/svg" -I"C:/Dev-Cpp/include/common/wx/xml" -I"C:/Dev-Cpp/include/common/wx/xrc" -I"C:/Dev-Cpp/include/common/wx" -I"C:/Dev-Cpp/include/common" -I"D:/CD-SQUIRREL/SQUIRREL2_1_1_sqplus_25/include" -I"D:/CD-SQUIRREL/SQUIRREL2_1_1_sqplus_25/sqplus" -I"D:/CD-SQUIRREL/SQUIRREL2_1_1_sqplus_25/sqstdlib"
    RCINCS    = --include-dir "C:/Dev-Cpp/include/common"
    BIN       = Output/MingW/sqplus.a
    DEFINES   =
    CXXFLAGS  = $(CXXINCS) $(DEFINES) 
    CFLAGS    = $(INCS) $(DEFINES) 
    GPROF     = gprof.exe
    RM        = rm -f
    LINK      = ar

    .PHONY: all all-before all-after clean clean-custom
    all: all-before $(BIN) all-after

    clean: clean-custom
     $(RM) $(OBJ) $(BIN)

    $(BIN): $(OBJ)
     $(LINK) rcu "$(BIN)" $(LINKOBJ)

    Objects/MingW/SquirrelVM.o: $(GLOBALDEPS) SquirrelVM.cpp sqplus.h SquirrelObject.h sqplus.h SquirrelVM.h SquirrelBindingsUtils.h SqPlusConst.h SqPlusConst.h SqPlusConst.h SqPlusConst.h SqPlusConst.h
     $(CPP) -c SquirrelVM.cpp -o Objects/MingW/SquirrelVM.o $(CXXFLAGS)

    Objects/MingW/zSqPlus.o: $(GLOBALDEPS) zSqPlus.cpp sqplus.h SquirrelObject.h sqplus.h SquirrelVM.h SquirrelBindingsUtils.h SqPlusConst.h SqPlusConst.h SqPlusConst.h SqPlusConst.h SqPlusConst.h
     $(CPP) -c zSqPlus.cpp -o Objects/MingW/zSqPlus.o $(CXXFLAGS)

    Objects/MingW/SquirrelBindingsUtils.o: $(GLOBALDEPS) SquirrelBindingsUtils.cpp sqplus.h SquirrelObject.h sqplus.h SquirrelVM.h SquirrelBindingsUtils.h SqPlusConst.h SqPlusConst.h SqPlusConst.h SqPlusConst.h SqPlusConst.h
     $(CPP) -c SquirrelBindingsUtils.cpp -o Objects/MingW/SquirrelBindingsUtils.o $(CXXFLAGS)

    Objects/MingW/SquirrelBindingsUtilsWin32.o: $(GLOBALDEPS) SquirrelBindingsUtilsWin32.cpp sqplus.h SquirrelObject.h sqplus.h SquirrelVM.h SquirrelBindingsUtils.h SqPlusConst.h SqPlusConst.h SqPlusConst.h SqPlusConst.h SqPlusConst.h SquirrelBindingsUtilsWin32.h SquirrelBindingsUtils.h
     $(CPP) -c SquirrelBindingsUtilsWin32.cpp -o Objects/MingW/SquirrelBindingsUtilsWin32.o $(CXXFLAGS)

    Objects/MingW/SquirrelObject.o: $(GLOBALDEPS) SquirrelObject.cpp sqplus.h SquirrelObject.h sqplus.h SquirrelVM.h SquirrelBindingsUtils.h SqPlusConst.h SqPlusConst.h SqPlusConst.h SqPlusConst.h SqPlusConst.h
     $(CPP) -c SquirrelObject.cpp -o Objects/MingW/SquirrelObject.o $(CXXFLAGS)

    ----------------------------------------------------------------------------------------------------

    The ERROR MESSAGE____________________________________________________________________

    ..\SQUIRREL2_1_1_sqplus_25\sqplus\SquirrelObject.h incomplete type

    `SquirrelVM' used in nested name specifier


    // === BEGIN code suggestion from the Wiki ===
      // Get any bound type from this SquirrelObject. Note that Squirrel's

    handling of references and pointers still holds here.
      template<typename _ty>
      inline _ty Get(void) {
        sq_pushobject(SquirrelVM::_VM,GetObjectHandle());
        _ty val = SqPlus::Get(SqPlus::TypeWrapper<_ty>(),SquirrelVM::_VM,-1);
        sq_poptop(SquirrelVM::_VM);
        return val;
      }

  •  05-24-2008, 11:04 AM 2534 in reply to 2533

    Re: compiling sqplus error

    Hello,

    It seems you're using an old version of SqPlus. In a newer version, you have:
    template<typename _ty>
    inline _ty SquirrelObject::Get(void) {
      sq_pushobject(SquirrelVM::_VM,GetObjectHandle());
      ...
    }
    in sqplus.h. In your case, the body of this functions seems to be in SquirrelObject.h (that's where the compiler complains).

    Try updating SqPlus (you could test the review version posted in this group).

    Regards
    // ATS.
  •  05-24-2008, 10:14 PM 2536 in reply to 2534

    Re: compiling sqplus error

    Thank you very much. I got the newer version from the main page and the problem is solved.
    And just to make it come to your attention, the review version link does not work for me . The link leads to an error page. Right clicking and save also do not work.
    Thanks again.
    Sajith
  •  05-25-2008, 1:58 AM 2537 in reply to 2536

    Re: compiling sqplus error

    Review version: The first link does not work (original version) after updating the file.

    The second link (last mail in thread) does work. I copy it here:

      SqPlus-Review.zip

    (should have chosen a different name for the update).

    Regards
    // ATS
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems