process terminated with status 3????????

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "../include/CApp.h"

CApp::CApp() {
    Surf_Display = NULL;

    Running = true;
}

int CApp::OnExecute() {
    if(OnInit() == false) {
        return -1;
    }

    SDL_Event Event;

    while(Running) {
        while(SDL_PollEvent(&Event)) {
            OnEvent(&Event);
        }

        OnLoop();
        OnRender();
    }

    OnCleanup();

    return 0;
}

int main(int argc, char* argv[]) {
    CApp theApp;

    return theApp.OnExecute();
}


above my main func and all stands. as u can see i have no return 3
and compiler gives me this error
Process terminated with status 3 (0 minutes, 0 seconds)

what is this error about. thx in advance
Last edited on
If you're running the application from within something like the Code::Blocks IDE then it will sandbox your app in it's own shell, this is where the error code 3 is coming from. So let us know what environment you're programming in and we can direct you to the error code definition.
i m using C::B 12.11
Last edited on
My mistake, the error code 3 might be coming from SDL, in which case it could mean a Segmentation fault. It's been a few years since I've looked at SDL so this might take me a minute if someone else doesn't beat me to it.
Last edited on
Could you post "CApp.h" EDIT: And CApp.c\CApp.cpp if they exist? My first theory is that one of the functions like "OnLoop()" or "OnRender()" are not being defined properly.
Last edited on
Sorry about the bumping but I want to make sure the OP sees this.

@ OP: Also make sure you are linking to the .c\.cpp files properly, in C::B this is done through "Project -> Add Files". The header file is enough for a forward declaration but if your compiler doesn't know to process the other source code files it will only have entries in the look-up table that don't go anywhere.
Last edited on
thx. after your reply i made a research and found it is a linking error. and i m sure i linked sdl properly. as you said the prob was that OnRender() not defined properly i fixed it and now it is ok.
Topic archived. No new replies allowed.