ERROR: was not declared in this scope

Im coding in code blocks and using SDL, and I've run into an error,
this is my first time trying to use multiple cpp files.


SystemBegin.h
1
2
3
4
5
6
7
8
9
10
11
#pragma once

//Global Varibles.
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 360;
const int SCREEN_BPP = 24;

SDL_Surface *SCREEN = NULL;
//FUNC Proto

bool Start_Subsystems();


main.cpp
1
2
3
4
5
6
7
#include "SystemBegin.h"
int main( int agrc, char* agrs[] )
{
    Start_Subsystems();
    Cleanup_Subsystems();
    return 0;
}


SystemFunctions.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "SystemBegin.h"
bool Start_Subsystems()
{
    ///SDL BEGIN
    if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 )
    {
        return false;
    }

    SCREEN = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE);

    if (SCREEN == NULL)
    {
        return false;
    }
}


complier tells me that
SCREEN
SCREEN_WIDTH
SCREEN_HEIGHT
SCREEN_BPP
was not declared in this scope
Check the preprocessor output when compiling SystemFunctions.cpp to double check that they're being included correctly.
Topic archived. No new replies allowed.