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

Author Topic: [solved]Installation Problem  (Read 3260 times)

0 Members and 1 Guest are viewing this topic.

Sayiain

  • Newbie
  • *
  • Posts: 6
    • View Profile
[solved]Installation Problem
« on: May 30, 2014, 12:03:07 pm »
I wanted to install SFML to Dev C++. After reading many articles, I managed to compile the example program. It crashed.
Quote
AppName: test.exe    AppVer: 0.0.0.0    ModName: sfml-network-2.dll
ModVer: 0.0.0.0    Offset: 0000973a
After that I downloaded Code::Blocks and installed SFML 2.1. No compilation problems, just crash with message:
Quote
Instruction at 0×000 referenced memory at 0×000. The memory could not be read.
I searched google. Found solution with recompiling SFML. I recompiled it with no errors. I used recompiled files (dll, a) and compiled the program with no errors. Again the same crash while executing.
I have an old PC, Windows XP SP3. I did the same on my friend's new PC Windows Vista. Exactly the same result for Dev C++ and Code::Blocks. So I assume it's not the mashine nor the system problem.
I tried to install 2.0 and 1.6 too. Exactlz the same results.
I guess I am installing SFML the wrong way.

Please help.
« Last Edit: May 30, 2014, 04:43:37 pm by Sayiain »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Installation Problem
« Reply #1 on: May 30, 2014, 02:02:07 pm »
Have you followed the official CMake tutorial precisely? It is absolutely crucial that you read it very carefully and don't miss any step. Most of the problems arise when people link things wrong because they have missed explanations in the tutorial.

If you have (double-check, read it again if necessary) and it still doesn't work, we need more meaningful information about your problem. With which settings did you build SFML, how do you link it? What is the code? Read also this post.

By the way, "sfml-network-2.dll" is not anymore a SFML DLL. Are you sure you're using SFML 2.1?
« Last Edit: May 30, 2014, 02:03:53 pm by Nexus »
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: Installation Problem
« Reply #2 on: May 30, 2014, 04:06:25 pm »
I wanted to install SFML to Dev C++. After reading many articles, I managed to compile the example program. It crashed.
Quote
AppName: test.exe    AppVer: 0.0.0.0    ModName: sfml-network-2.dll
ModVer: 0.0.0.0    Offset: 0000973a
After that I downloaded Code::Blocks and installed SFML 2.1. No compilation problems, just crash with message:
Quote
Instruction at 0×000 referenced memory at 0×000. The memory could not be read.
I searched google. Found solution with recompiling SFML. I recompiled it with no errors. I used recompiled files (dll, a) and compiled the program with no errors. Again the same crash while executing.
I have an old PC, Windows XP SP3. I did the same on my friend's new PC Windows Vista. Exactly the same result for Dev C++ and Code::Blocks. So I assume it's not the mashine nor the system problem.
I tried to install 2.0 and 1.6 too. Exactlz the same results.
I guess I am installing SFML the wrong way.

Please help.

Last I remember, Dev C++ is an extremely old IDE that hasn't been updated in a decade. I highly recommend jumping ship and learning an IDE that is continually supported such as Visual Studio or Code::blocks. These have a ton of community support as well as SFML support.

Sayiain

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Installation Problem
« Reply #3 on: May 30, 2014, 04:42:57 pm »
@Nexus
I removed everything and did it once again from the begining.

I downloaded and installed codeblocks-13.12mingw-setup.exe from:
http://www.codeblocks.org/downloads/binaries

On this site:
http://www.sfml-dev.org/tutorials/2.1/start-cb.php
I read:
Quote
If you're using the version of MinGW shipped with Code::Blocks, you probably have a SJLJ version.
I do.

I downloaded SFML 2.1 Windows GCC 4.7 TDM (SJLJ) - 32 bits from:
http://www.sfml-dev.org/download/sfml/2.1/
I extracted the SFML-2.1 folder in Code Blocks folder.

I executed Code Blocks.
I created new Project - Test.

Project->Build options...
Test:
Compiler settings:
#defines:
SFML_STATIC

Search drectories:
Compiler - Add:
C:\Program Files\CodeBlocks\SFML-2.1\include
OK

Linker - Add:
C:\Program Files\CodeBlocks\SFML-2.1\lib
OK

Debug: Linker Settings - Add:
libsfml-graphics-s-d
libsfml-window-s-d
libsfml-system-s-d
libsfml-audio-s-d
libsfml-network-s-d
OK

Release: Linker Settings - Add:
libsfml-graphics-s
libsfml-window-s
libsfml-system-s
libsfml-audio-s
libsfml-network-s
OK

I put the code:
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

Ok It worked. :D
The problem was wrong package. Previously I downloaded GCC 4.7 MinGW (DW2) - 32 bits.
Thank you for patience.

@Syntactic Fructose
I did. However very good idea. I also recommend it to others.

Thank you all.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Installation Problem
« Reply #4 on: May 30, 2014, 04:47:53 pm »
Last I remember, Dev C++ is an extremely old IDE that hasn't been updated in a decade. I highly recommend jumping ship and learning an IDE that is continually supported such as Visual Studio or Code::blocks. These have a ton of community support as well as SFML support.
the Bloodshed Dev C++ IDE is old and should not be used anymore, however someone took on the project and created Orwell Dev C++, which was last updated on the 4th May.

But Code::Blocks is a good choice.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything