Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8192659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:13:42+00:00 2026-06-07T04:13:42+00:00

I have started to make a game in C++ with SDL. My Code is:

  • 0

I have started to make a game in C++ with SDL. My Code is:

main.cpp

#include "SDL/SDL.h"
#include "gameSystem.h"

int main(int argc, char *args[])
{
    gameSystem systemHandler;
    SDL_Surface *buffer;
    SDL_Event event;
    while(event.type != SDL_QUIT)
    {
        SDL_PollEvent(&event);
        SLD_Flip(buffer);
    }
}

gameSystem.cpp

#include "SDL/SDL.h"
#include "gameSystem.h"

gameSystem::gameSystem()
{
    SDL_Init(SDL_INIT_EVERYTHING);
    SDL_WM_SetCaption("GameName", NULL);
    SDL_Surface *buffer;
    bool fullscreen = false;
    if (fullscreen == true)
        {buffer = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE | SDL_FULLSCREEN);}
    else
        {buffer = SDL_SetVideoMode(640, 480, 32, SDL_SWSURFACE);}
}

gameSystem::~gameSystem()
{
    SDL_Quit();
}

gameSystem.h

class gameSystem
{
    public:
        gameSystem();
        ~gameSystem();
    private:
        SDL_Surface *buffer;
};

My linker options include: -lmingw32 -lSDLmain -lSDL -lwinmm -sdl_Mixer

I get the following error: “error: ‘SLD_Flip’ was not declared in this scope” on line 12 of main.cpp.

All the other SDL functions seem to be fine.

Does anyone know how to fix this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T04:13:44+00:00Added an answer on June 7, 2026 at 4:13 am

    You misspelled it. It should be SDL_Flip, not SLD_Flip.

    Also, you haven’t initialized your variable buffer in main. You are not setting its value inside of gameSystem::gameSystem(); the variable is out of scope.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just started trying to make a simple game with XNA 3.1 to
I have just started learning OpenGL and I am attempting to make a game
I started to make a simple domino game. (the one where you place the
Ok, simple problem hopefully. I have started to make a simple server for a
I have started to make a webapp with asp.net mvc2. I am using the
I'm working on an HTML5/JavaScript game engine, and I have started to encounter a
I have just started developing in Android and I am trying to make a
I am making a game and have started to work on a class called
I want to make a game where you have little avatars walking over pages,
I am trying to make the game Asteroids. My issue I have right now,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.