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

Author Topic: Problem with the RenderWindow Tutorial  (Read 5306 times)

0 Members and 2 Guests are viewing this topic.

Rexona for men

  • Newbie
  • *
  • Posts: 24
    • View Profile
Problem with the RenderWindow Tutorial
« on: August 08, 2011, 02:24:09 pm »
Hello guys, i have a problem with the Tutorial named above.

I copied the Code into my Visual C++. I also copied the dlls of System, Graphic and Window, both the normal and debug version into my project folder.
Program is compiling right, but I get an runtimerror, that some dlls cant be find or open. It's not just the SFML dlls, but also some dlls from system32 folder  :shock:

What is going on?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem with the RenderWindow Tutorial
« Reply #1 on: August 08, 2011, 03:05:45 pm »
Quote
some dlls cant be find or open

Which ones?
Laurent Gomila - SFML developer

Rexona for men

  • Newbie
  • *
  • Posts: 24
    • View Profile
Problem with the RenderWindow Tutorial
« Reply #2 on: August 08, 2011, 05:29:32 pm »
From the SFML: System Graphic and Window (all I used).

From System32 folder: Ca. 20 different dlls, among others kernel.dll, opneGl.dll, user32.dll, crypt.dll, ...

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem with the RenderWindow Tutorial
« Reply #3 on: August 08, 2011, 06:22:46 pm »
Do you really get a runtime error for all of them? Usually, Windows displays a message for only the first one that it tries to load.
Laurent Gomila - SFML developer

Rexona for men

  • Newbie
  • *
  • Posts: 24
    • View Profile
Problem with the RenderWindow Tutorial
« Reply #4 on: August 08, 2011, 06:27:24 pm »
Hm, ok maybe runtime Error wasn't the right word.
In fact I used the debugger step by step function, and after crash, I got this huge list of unsuccesfully opened dlls.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem with the RenderWindow Tutorial
« Reply #5 on: August 08, 2011, 07:47:41 pm »
These things are not errors, it's just the debugger telling you that it couldn't load the debugging symbols for some DLLs -- which is normal because you didn't download them (you're not supposed to debug inside system libraries).

So, nothing's wrong actually.
Laurent Gomila - SFML developer

Rexona for men

  • Newbie
  • *
  • Posts: 24
    • View Profile
Problem with the RenderWindow Tutorial
« Reply #6 on: August 08, 2011, 11:51:27 pm »
:shock:

However, the SFML dlls cant open, too, both the normal and debug version.
I'm sure I dowloaded them, because they're in my project folder.
(by the way I tried release version, too, but got some errors like this:
""public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UAE@XZ)".)

What I have to do to run the Program succesfully?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem with the RenderWindow Tutorial
« Reply #7 on: August 09, 2011, 07:59:16 am »
Quote
However, the SFML dlls cant open, too, both the normal and debug version.

Now, please give exact error messages instead of fuzzy descriptions ;)

Quote
I'm sure I dowloaded them, because they're in my project folder

They must be in the same directory as the executable that uses them.
Laurent Gomila - SFML developer

Rexona for men

  • Newbie
  • *
  • Posts: 24
    • View Profile
Problem with the RenderWindow Tutorial
« Reply #8 on: August 09, 2011, 10:44:40 pm »
Quote
Now, please give exact error messages instead of fuzzy descriptions Wink


Ill try, however, i'm from germany, and so the error messages are in german. I hope you can handle this

I got tis from release version:



main.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UAE@XZ)".

1>main.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: __thiscall sf::RenderWindow::RenderWindow(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned long,struct sf::WindowSettings const &)" (??0RenderWindow@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z)".

1>main.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ)".

1>main.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: bool __thiscall sf::Window::GetEvent(class sf::Event &)" (?GetEvent@Window@sf@@QAE_NAAVEvent@2@@Z)".

1>main.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: bool __thiscall sf::Window::IsOpened(void)const " (?IsOpened@Window@sf@@QBE_NXZ)".

1>main.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: void __thiscall sf::Window::Close(void)"
(?Close@Window@sf@@QAEXXZ)".

1>main.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z)".

1>main.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: void __thiscall sf::RenderTarget::Clear(class sf::Color const &)" (?Clear@RenderTarget@sf@@QAEXABVColor@2@@Z)".

1>main.obj : error LNK2001: Nicht aufgelöstes externes Symbol ""public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QAE@EEEE@Z)".



I got also this from step by step debugging:



"SFML Test Projekt.exe": "C:\Users\****\Documents\Visual Studio 2010\Projects\SFML Test Projekt\Debug\SFML Test Projekt.exe" geladen, Symbole wurden geladen.
"SFML Test Projekt.exe": "C:\Windows\System32\ntdll.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\kernel32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Users\****\Documents\Visual Studio 2010\Projects\SFML Test Projekt\SFML Test Projekt\sfml-graphics.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\opengl32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\msvcrt.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\advapi32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\rpcrt4.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\gdi32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\user32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\glu32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\ddraw.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\dciman32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\setupapi.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\oleaut32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\ole32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\dwmapi.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Users\****\Documents\Visual Studio 2010\Projects\SFML Test Projekt\SFML Test Projekt\sfml-window.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\winmm.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\oleacc.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Users\****\Documents\Visual Studio 2010\Projects\SFML Test Projekt\SFML Test Projekt\sfml-system.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cb\msvcp90.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\winsxs\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cb\msvcr90.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\msvcp100d.dll" geladen, Symbole wurden geladen.
"SFML Test Projekt.exe": "C:\Windows\System32\msvcr100d.dll" geladen, Symbole wurden geladen.
"SFML Test Projekt.exe": "C:\Windows\System32\imm32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\msctf.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\lpk.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\usp10.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\uxtheme.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Advanced Wheel Mouse\wh_hook.dll" geladen, Die Binärdaten wurden nicht mit Debuginformationen erstellt.
"SFML Test Projekt.exe": "C:\Windows\System32\nvoglv32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\wintrust.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\crypt32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\msasn1.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\userenv.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\secur32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\imagehlp.dll" geladen, Cannot find or open the PDB file
Der Thread 'Win32-Thread' (0x154) hat mit Code 0 (0x0) geendet.
"SFML Test Projekt.exe": "C:\Windows\System32\dinput.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\hid.dll" geladen, Cannot find or open the PDB file

And thank you very much for your help :D

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem with the RenderWindow Tutorial
« Reply #9 on: August 10, 2011, 08:01:44 am »
Quote
Nicht aufgelöstes externes Symbol

This is a link error, it says that the linker couldn't locate the function in your code and the libraries that you linked to your project. It has nothing to do with DLLs ;)

To solve it, you must link to sfml-window and sfml-system (look at the tutorial).

Quote
I got also this from step by step debugging

How can you run your executable if it cannot even be compiled??
Laurent Gomila - SFML developer

Rexona for men

  • Newbie
  • *
  • Posts: 24
    • View Profile
Problem with the RenderWindow Tutorial
« Reply #10 on: August 10, 2011, 10:52:22 pm »
Quote
To solve it, you must link to sfml-window and sfml-system (look at the tutorial).


Well, actually i've already linked to sfml-window and sfml-system :shock:

Quote
How can you run your executable if it cannot even be compiled??


Well, without step by step processing, I get the console and then an error message with the option to send my error information to microsoft.
But only in debug mode.
In release mode nothing is started.

Wth, I looked again at  additional dependencies and found nothing
 :shock:
I don't know, why they disappear, but I linked again, and now, both the debug and release mode open a console, but get the same error. (the microsoft message).
Ill post the messages from step by step debugging later, VS seems a bit buggy at the moment :shock:

E: Ah, I only linked the libs with the debug mode, thatswhile release mode couldn't compile.
Now in debug mode I get this error:
Die Anwendung konnte nicht richtig initialisiert werden (0xc0150002)
By the way I linked the debug mode with the debug libs.
Console is also open by the program.

This is the error message by step by step debugging:

"SFML Test Projekt.exe": "C:\Windows\System32\ntdll.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\kernel32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Users\Gunnar\Documents\Visual Studio 2010\Projects\SFML Test Projekt\SFML Test Projekt\sfml-graphics-d.dll" geladen, Cannot find or open the PDB file

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem with the RenderWindow Tutorial
« Reply #11 on: August 11, 2011, 08:10:35 am »
Quote
Die Anwendung konnte nicht richtig initialisiert werden

Please, next time provide a translation ;)

This message is often triggered when a DLL is missing. Are you linking to the dynamic libraries of SFML? If so, did you copy the SFML DLLs in the same directory as the executable?

Quote
This is the error message by step by step debugging:

"SFML Test Projekt.exe": "C:\Windows\System32\ntdll.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Windows\System32\kernel32.dll" geladen, Cannot find or open the PDB file
"SFML Test Projekt.exe": "C:\Users\Gunnar\Documents\Visual Studio 2010\Projects\SFML Test Projekt\SFML Test Projekt\sfml-graphics-d.dll" geladen, Cannot find or open the PDB file

Stop bothering with this output, these messages are perfectly normal ;)
You won't get anything relevant in this window.
Laurent Gomila - SFML developer

Rexona for men

  • Newbie
  • *
  • Posts: 24
    • View Profile
Problem with the RenderWindow Tutorial
« Reply #12 on: August 12, 2011, 07:06:05 pm »
Quote
Please, next time provide a translation Wink


Ill try :D

Quote
This message is often triggered when a DLL is missing. Are you linking to the dynamic libraries of SFML? If so, did you copy the SFML DLLs in the same directory as the executable?


I did, and I started a new project with the same settings, but got the the same error :shock: .

Quote
Stop bothering with this output, these messages are perfectly normal Wink
You won't get anything relevant in this window.


So this: http://www.image-uploader.de/bild.php/8033,debugwindowQKQUH.jpg
is normal for debug mode?

And this for release mode?:
http://www.image-uploader.de/bild.php/8034,release2SP5T.jpg
 :shock:

By the way, this message always appears while step by step debugging:
Through a buffer-overflow in text.exe have the intern program state got been damaged.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Problem with the RenderWindow Tutorial
« Reply #13 on: August 12, 2011, 07:24:36 pm »
Quote
So this: http://www.image-uploader.de/bild.php/8033,debugwindowQKQUH.jpg
is normal for debug mode?

And this for release mode?:
http://www.image-uploader.de/bild.php/8034,release2SP5T.jpg

Absolutely not. I was only talking about the "cannot find PDB files" message in the Visual Studio output, which has nothing to do with these errors that you show.

Quote
By the way, this message always appears while step by step debugging:
Through a buffer-overflow in text.exe have the intern program state got been damaged.

Ok so here we are: you have a buffer overflow in your program. With the debugger you should see where it happens. If not, please post your code.

And by the way, this is totally different than your previous error... so I guess that your new project actually solved it.
Laurent Gomila - SFML developer

Rexona for men

  • Newbie
  • *
  • Posts: 24
    • View Profile
Problem with the RenderWindow Tutorial
« Reply #14 on: August 12, 2011, 10:35:44 pm »
It seems to happen, when the App.Clear function is called.
By the way I just copied the code from the Tutorial section.

In the log I get:
First execption at 0x0100a800 in test,exe 0xC0000005: Access violation

It also says, that the heap is damaged.

Here my code if it's needed:

Code: [Select]
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>

int main()
{
    // Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
   
    // Start game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
App.Close();
        }

        // Clear the screen (fill it with black color)
App.Clear();

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

    return EXIT_SUCCESS;
}

 

anything