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

Author Topic: Can not compile 1st application  (Read 2929 times)

0 Members and 1 Guest are viewing this topic.

Hamed

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Can not compile 1st application
« on: January 30, 2013, 03:34:47 pm »
I follow :
http://www.sfml-dev.org/tutorials/2.0/start-cb.php
and I install SFML now when I want to run my program I get error and I attach my error.
Also when I use "Debug / Continue" I get:
#0 691C4AF9   sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int) () (C:\CPP\FA\bin\Debug\sfml-window-2.dll:??) #1 00401416   main() (C:\CPP\FA\main.cpp:5)

[attachment deleted by admin]

Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
Re: Can not compile 1st application
« Reply #1 on: January 30, 2013, 03:39:43 pm »
There is simply no way in hell anybody could help you with this little information!
So please: What OS are you using? What compiler (+version)? What version of SFML? (if 2.0: self compiled, RC or unofficial nightlies?)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Can not compile 1st application
« Reply #2 on: January 30, 2013, 03:53:02 pm »
Quote
There is simply no way in hell anybody could help you with this little information!
I can ;D

You must recompile SFML because your gcc is a 4.7, and it is not compatible with the precompiled version of SFML that you downloaded (which was compiled with a gcc 4.4).
Laurent Gomila - SFML developer

Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
Re: Can not compile 1st application
« Reply #3 on: January 30, 2013, 03:59:57 pm »
Haha well alright I already guessed that as well, because it is a problem that has been reoccurring a couple times, but I wanted to be sure.
Providing almost no information about a crash makes it extremely hard to impossible for everybody who is willing to help in every other case...
Also a simple google search would have brought up the same answer.

Hamed

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Re: Can not compile 1st application
« Reply #4 on: January 30, 2013, 04:03:39 pm »
Where can I download source and recompile SFML?

Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
Re: Can not compile 1st application
« Reply #5 on: January 30, 2013, 04:06:51 pm »
You can either download the source from github and compile it with cmake using the tutorial or you can use the precompiled unofficial nighly builds.

Hamed

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Re: Can not compile 1st application
« Reply #6 on: January 30, 2013, 04:21:54 pm »
I use nightly builds but now I get:


[attachment deleted by admin]

Foaly

  • Sr. Member
  • ****
  • Posts: 453
    • View Profile
Re: Can not compile 1st application
« Reply #7 on: January 30, 2013, 04:26:33 pm »
What nighly build have downloaded? What's your MinGW version?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Can not compile 1st application
« Reply #8 on: January 30, 2013, 04:30:21 pm »
For the compiler that ships with Code::Blocks you need the matching builds (TDM).
Also don't forget to make a clean rebuild!
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Hamed

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Re: Can not compile 1st application
« Reply #9 on: January 30, 2013, 04:33:30 pm »
Code::Blocks : 12.11
MinGW : 4.7.2 (Integrated with Code::Blocks install)


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Can not compile 1st application
« Reply #10 on: January 30, 2013, 04:37:15 pm »
MinGW : 4.7.2 (Integrated with Code::Blocks install)
Not possible. Code::Blocks ships with MinGW GCC 4.7.1 TDM, which matches my TDM nightly builds. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Hamed

  • Newbie
  • *
  • Posts: 21
    • View Profile
    • Email
Re: Can not compile 1st application
« Reply #11 on: January 31, 2013, 03:47:19 pm »
Ok!
I compile 1st application and it ok.
But it is ok just when I use Code::Blocks and when I want to run application without code::Blocks I get:
The program can't start because libgcc_s_dw2-1.dll is missing from your computer.Try reinstalling the program to fix this program.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Can not compile 1st application
« Reply #12 on: January 31, 2013, 03:57:28 pm »
You must copy the libgcc_s_dw2-1.dll file (from your mingw/bin folder) next to the executable.
Laurent Gomila - SFML developer