Need help

edited January 2011 in General discussions
Hello.
Began to study the ORX. In a lesson ->
http://orx-project.org/wiki/en/orx/tutorials/community/grey/tutorial2
There was a problem. Crash error ->
Error 1 error C2600: 'StandAlone:: StandAlone': cannot define a compiler-generated special member function (must be declared in the class first) d: job orx source standalone.cpp 17
In what may be the problem?

More ... if we remove from StandAlone.cpp
StandAlone:: StandAlone ()
{
}
, then the dialog box is opened
Microsoft Visual Studio
project_d.exe has triggered a breakpoint
button break, click Continue button and Ignore (inactive).

Thanks in advance!
1.JPG
1 20.2K

Comments

  • edited January 2011
    Hi epishev!

    I haven't tried Grey's tutorial myself so I might not be the best person to answer this.

    It might sound trivial, but the compiler error suggest you have a member function in your implementation/.cpp that isn't first declared in the class, have you checked for all your member functions?

    if you still can't find the issue, can you post your .cpp/.h files here or somewhere accessible for us to look at?
  • edited January 2011
    Here Archives
    Code is completely copied from http://orx-project.org/wiki/en/orx/tutorials/community/grey/tutorial2
    There's also something that should happen.
    What did I do wrong? Not so set up a project? Several times reworked.
  • edited January 2011
  • edited January 2011
    Hey mate, taking a look now :)

    *edit*

    Okay, found the issue :)

    When coding, it is good practice (and why I've set the tutorials up as I have) to separate the class definition (basically everything in the header [.h] file) and the implementation (everything in the .cpp file).

    The implementation of various functions need to know -what- they are implementing however, so you tell them by using the class name, followed by two colons. In our case this is "StandAlone::"

    Inside the definition, the code already 'knows' what class it is trying to find, so adding that extra piece of information confuses the compiler.

    The fix for your issue is simply to change one line in StandAlone.H

    from:
    public:
      StandAlone::StandAlone();
    
    to:
    public:
      StandAlone();
    

    :) Hope that helps!
  • edited January 2011
    No errors now. But still not working as it should.

    Several times to open and instantly close the window.
    Then there
    1-329801d9d13da3b1651d6d564413a995.JPG

    If you click "Continue" it appears:
  • edited January 2011
    2.JPG
    2 90.4K
  • edited January 2011
    compiler indicate a stopping point:

    orxViewport_CreateFromConfig ("Viewport");

    in StandAlone.cpp
  • edited January 2011
    Hmm, I went over your project file, and you've missed a few steps in setting it up.

    For debugging, you'll need to set up the working directory.

    5_Properties.png

    Also, you can use relative paths (..in) -will- find your correct directory. Basically think of it as directions from the project file... so ".." means "up one level" etc (if I'm explaining things you know, feel free to ignore this :))
  • edited January 2011
    I created a working directory, but the result was thus managing :unsure:
    I do not understand what was going on. :dry:
  • edited January 2011
    Sorry mate, not sure what you mean...

    try this though: http://grey.orx-project.org/project.zip

    (*edit* worst case... this should work: http://grey.orx-project.org/ORX.zip -- it's a complete 'working' tutorial 2 file)

    *edit* more typo fixing :p
  • edited January 2011
    sorry, my English is very bad.
    Replaced project.sln, everything remained as before.

    You do not have compiled the project from the tutorial:
    http://orx-project.org/wiki/en/orx/tutorials/community/grey/tutorial2

    This will help me.
  • edited January 2011
    Sorry :)
  • edited January 2011
    The edit I did in my other post ( http://grey.orx-project.org/ORX.zip ) is a complete version of tutorial 2. All you have to do is compile it. I have tested it using Visual C++ Express 2008 about 10 minutes ago. :)

    *edit* and no need to be sorry mate :) I'm sure I'm -terrible- at many other languages :D

    *edit* fixed typo in link :)
  • edited January 2011
    can not download grey.orx-project.orx/ORX.zip -> Error
  • edited January 2011
    huh, strange... one second I'll fix that -_-

    erm, haha


    http://grey.orx-project.org/ORX.zip ;) typos fixed
  • edited January 2011
    Thank you very much, Grey.
    :)
Sign In or Register to comment.