Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Really annoying problem with windows not "opening"  (Read 9351 times)

0 Members and 1 Guest are viewing this topic.

cdlink14

  • Newbie
  • *
  • Posts: 13
    • View Profile
Really annoying problem with windows not "opening"
« on: July 30, 2011, 07:28:24 pm »
I need help with using SFML in Code::Blocks, I have it all set up correctly, and I'm using the tutorial to try and draw a basic window but it's not showing

Here's the code:

Code: [Select]

#include <SFML/Window.hpp>

int main()
{
// Create the main window
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

// Start main loop
bool Running = true;
while (Running)
{
App.Display();
}

return EXIT_SUCCESS;
}


I know SFML is set up correctly as the code in this tutorial works perfectly:
http://www.sfml-dev.org/tutorials/1.6/start-cb.php

When I run the application I just get the console window:
http://dl.dropbox.com/u/3901038/FP/sfml/SFM2L.JPG

I've tried compiling in Debug and Release (using their respective dependencies).

Well when I set it to debug it doesn't seem to reach any breakpoints, it doesn't even reach "int main()", which leads me to believe this is an error with an header file...

Any help on how to go about finding/fixing it?

Also this happens running SFML on VS2008 (using the correct files/tutorials).

Specs:
windows 7 Pro x64
Code::Blocks 10.05
Visual Studio 2008
SFML C++ FULL SDK 1.6
Need anything else just ask.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Really annoying problem with windows not "opening"
« Reply #1 on: July 30, 2011, 07:33:34 pm »
ATI graphics card?
Laurent Gomila - SFML developer

cdlink14

  • Newbie
  • *
  • Posts: 13
    • View Profile
Really annoying problem with windows not "opening"
« Reply #2 on: July 30, 2011, 07:43:29 pm »
Yup ATI Radeon HD 5750 vapor-X 1GB if that helps.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Really annoying problem with windows not "opening"
« Reply #3 on: July 30, 2011, 08:36:40 pm »
SFML 1.6 (dynamic linking) doesn't work when combined with Windows and an ATI graphics card with recent drivers.

You can workaround the bug by linking statically to SFML, or switch to SFML 2.
Laurent Gomila - SFML developer

cdlink14

  • Newbie
  • *
  • Posts: 13
    • View Profile
Really annoying problem with windows not "opening"
« Reply #4 on: July 30, 2011, 08:53:48 pm »
Am I able to just install SFML 2 and it'll work straight off the bat with my current code? Or will I need to recode some things?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Really annoying problem with windows not "opening"
« Reply #5 on: July 30, 2011, 08:55:37 pm »
You need to change some code, see here.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

cdlink14

  • Newbie
  • *
  • Posts: 13
    • View Profile
Really annoying problem with windows not "opening"
« Reply #6 on: July 30, 2011, 09:04:04 pm »
Also I can't seem to find the lib folder in the archive.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Really annoying problem with windows not "opening"
« Reply #7 on: July 30, 2011, 09:19:59 pm »
There's no release yet, the archive contains the current development code, you must compile it yourself.
Laurent Gomila - SFML developer

cdlink14

  • Newbie
  • *
  • Posts: 13
    • View Profile
Really annoying problem with windows not "opening"
« Reply #8 on: July 30, 2011, 09:24:25 pm »
Ok so I'm trying to compile them using Cmake, but when I try to compile for "CodeBlocks - MinGW Makefiles" or just "MinGW Makefiles" I get an error

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Really annoying problem with windows not "opening"
« Reply #9 on: July 30, 2011, 09:29:49 pm »
Is MinGW installed on your computer? Maybe there needs to be a PATH  (environment variable) entry for the directory containing g++.exe.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

cdlink14

  • Newbie
  • *
  • Posts: 13
    • View Profile
Really annoying problem with windows not "opening"
« Reply #10 on: July 30, 2011, 10:04:38 pm »
MinGW came installed with my code::blocks, where would I find the path variable to edit?

cdlink14

  • Newbie
  • *
  • Posts: 13
    • View Profile
Really annoying problem with windows not "opening"
« Reply #11 on: July 30, 2011, 10:16:35 pm »


Which one is the Cmake compiler I'm supposed to use?

danman

  • Hero Member
  • *****
  • Posts: 1121
    • View Profile
    • Email
Really annoying problem with windows not "opening"
« Reply #12 on: July 31, 2011, 12:24:45 am »
CMake is not a compiler ;) it's a very powerful compiler's "project" generation tools that you need to install from http://www.cmake.org/ .

edit : ahm, didn't read the entire post.

Open the cmake-gui, set it to SFML's directory, clear the cache (in file menu), then configure.
a window appear and you have 4 choices, choose native compiler, but with the option to define the compilers yourself, and then choose g++.exe for C++; gcc.exe for C ;) .
Pointilleur professionnel

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Really annoying problem with windows not "opening"
« Reply #13 on: July 31, 2011, 12:33:17 am »
Quote from: "cdlink14"
where would I find the path variable to edit?
Control panel -> System -> Advanced system settings -> Advanced -> Environment variables. Check if the PATH entry contains the bin folder of MinGW.

There are also direct ways, one of which is the shell command SET. Or use the start search ;)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

cdlink14

  • Newbie
  • *
  • Posts: 13
    • View Profile
Really annoying problem with windows not "opening"
« Reply #14 on: July 31, 2011, 03:35:30 am »
Quote from: "danman"
CMake is not a compiler ;) it's a very powerful compiler's "project" generation tools that you need to install from http://www.cmake.org/ .

edit : ahm, didn't read the entire post.

Open the cmake-gui, set it to SFML's directory, clear the cache (in file menu), then configure.
a window appear and you have 4 choices, choose native compiler, but with the option to define the compilers yourself, and then choose g++.exe for C++; gcc.exe for C ;) .

When I try that I get this:
Code: [Select]
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:D:/Users/user/Desktop/LaurentGomila-SFML-732b789-BUILD/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Could not find cmake module file:D:/Users/user/Desktop/LaurentGomila-SFML-732b789-BUILD/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
Configuring incomplete, errors occurred!

 

anything