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

Author Topic: Program starts but no window, using VC++ 2010  (Read 2166 times)

0 Members and 1 Guest are viewing this topic.

Sepii

  • Newbie
  • *
  • Posts: 2
    • View Profile
Program starts but no window, using VC++ 2010
« on: August 01, 2011, 04:40:57 pm »
I've been using SDL for a few months and I liked it, but then I saw that SFML had a few options that I missed in SDL. So I was trying to start SFML today by following the tutorials. I got the system package tutorials working. So I wanted to go and create a Window. I followed the tutorial and set the configurations and when I tried to run the program all I got was the console window.
I have no compilations errors, I tried to run in debug and release. ( I didn't forget the -d for the debug libraries ). I copied the code from the tutorials so I really don't know what's wrong  :? .

Code: [Select]


////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Window.hpp>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Events");

    // Get a reference to the input manager associated to our window, and store it for later use
    const sf::Input& Input = App.GetInput();

    // Start main loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();

            // Escape key : exit
            if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
                App.Close();
        }

        // Get some useless input states, just to illustrate the tutorial
        bool         LeftKeyDown     = Input.IsKeyDown(sf::Key::Left);
        bool         RightButtonDown = Input.IsMouseButtonDown(sf::Mouse::Right);
        bool         JoyButton1Down  = Input.IsJoystickButtonDown(0, 1);
        unsigned int MouseX          = Input.GetMouseX();
        unsigned int MouseY          = Input.GetMouseY();
        int          JoystickX       = Input.GetJoystickAxis(1, sf::Joy::AxisZ);
        int          JoystickY       = Input.GetJoystickAxis(1, sf::Joy::AxisY);
        int          JoystickPOV     = Input.GetJoystickAxis(1, sf::Joy::AxisPOV);

        // Display window on screen
        App.Display();
    }

    return EXIT_SUCCESS;
}


The errors I get from the debugger from VC++ are the following:

Code: [Select]

'SFML.exe': Loaded 'E:\C++\Projects\SFML\Release\SFML.exe', Symbols loaded.
'SFML.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'E:\C++\Projects\SFML\Release\sfml-window.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'E:\C++\Projects\SFML\Release\sfml-system.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcp90.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_50934f2ebcb7eb57\msvcr90.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\msvcp100.dll', Symbols loaded.
'SFML.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Symbols loaded.
'SFML.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\atiglpxx.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\atioglxx.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\atigktxx.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\aticfx32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\atiadlxy.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\shell32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\userenv.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\profapi.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\wtsapi32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\psapi.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'SFML.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
The thread 'Win32 Thread' (0xbd4) has exited with code -1073741510 (0xc000013a).
The thread 'Win32 Thread' (0x19e0) has exited with code -1073741510 (0xc000013a).
The program '[6632] SFML.exe: Native' has exited with code -1073741510 (0xc000013a).


So I would be really glad if someone could point out what's wrong.

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Program starts but no window, using VC++ 2010
« Reply #1 on: August 02, 2011, 12:08:14 pm »
Looks like a configuration issue to me.

You are running a Release build, but VC++ is looking for the PDB (debug info) in the SFML and Windows libraries you've told it to use, not finding it, and failing.

Make sure that you configured CMake correctly, and built the right libraries.

Oh, and SFML is MUCH better than SDL. I converted to SFML about 9 months ago, from SDL 1.3, and have not looked back.

Ed
SFML 2.1

Sepii

  • Newbie
  • *
  • Posts: 2
    • View Profile
Program starts but no window, using VC++ 2010
« Reply #2 on: August 02, 2011, 02:43:01 pm »
@slotdev
It works :) I got the error when I used version 1.6. So I tried 2.0 and after a few problems with compiling it works now. So the problem is solved. And now I'm finally going to dig in SFML.

 

anything