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

Author Topic: Trouble getting set up.  (Read 6273 times)

0 Members and 1 Guest are viewing this topic.

Fordun

  • Newbie
  • *
  • Posts: 10
    • View Profile
Trouble getting set up.
« on: July 24, 2013, 06:37:41 am »
I can seem to get SFML to work correctly. I posted something over at Stack Overflow and didn't get any help. So i figured i would try to get help straight from the horse's mouth.

Here's my post over at Stack Overflow.

http://stackoverflow.com/questions/17806871/trouble-setting-up-sfml-in-codeblocks

I'm using the windows-gcc-4.7 64bit version of SFML 2.0. I have the .dll files from SFML's "bin" folder directly in my project folder. I have my linker and compiler settings set up the exact same way they look in the official tutorial for Code::Blocks.

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: Trouble getting set up.
« Reply #1 on: July 24, 2013, 10:25:15 am »
Now my linker settings - sfml-system sfml-window sfml-graphics

It's the wrong order. With this settings i get the same error as you.

Right order:

-lsfml-graphics
-lsfml-window
-lsfml-system


AlexAUT

Fordun

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Trouble getting set up.
« Reply #2 on: July 24, 2013, 11:00:51 am »
They were originally set up in that order. Guess that was a typo on my part. Never the less i tried every combo of those i could to rule out all possibilities. I put them in the linker with and without the "-l" prefix. It seems it adds it automatically as the error was simply "cannot find -l-l-sfml-graphics". While linking to the lib's as usual gives me the same error I've had all along. So it seems it has found the libraries. But its like my .a files are blank.

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: Trouble getting set up.
« Reply #3 on: July 24, 2013, 11:03:50 am »
Wich IDE/compiler do you use?

Wich SFML version? 2.0 pre-compiled? or did you compile it yourself?


AlexAUT

Fordun

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Trouble getting set up.
« Reply #4 on: July 24, 2013, 11:12:33 am »
Code::Blocks 12.11
GNU GCC compiler.

Using SFML 2.0. The link you see when going to the downloads page under "Windows" titled "GCC 4.7 TDM (SJLJ) - 64 bits"

Not entirely sure what pre-compiled means. I've been hearing alot about this Cmake thing. I can help but feeling this is vital.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Trouble getting set up.
« Reply #5 on: July 24, 2013, 11:20:22 am »
I don't think that your compiler is a 64 bits one. Therefore you must download the 32 bits version of SFML.
Laurent Gomila - SFML developer

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: Trouble getting set up.
« Reply #6 on: July 24, 2013, 12:20:09 pm »
Codeblocks always ships the 32bit tdm compiler, so you should use the "GCC 4.7 TDM (SJLJ) - 32 bits" download.

Quote
NOTE: The codeblocks-12.11mingw-setup.exe file includes the GCC compiler and GDB debugger from TDM-GCC (version 4.7.1, 32 bit).


Pre-compiled: means that Laurent (or anyone else) compiled SFML with hopefully your compiler and you use the library files... But you can compile SFML by yourself too using CMake, but its not necessary because of the pre-compiled packages...



AlexAUT

Fordun

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Trouble getting set up.
« Reply #7 on: July 24, 2013, 04:15:56 pm »
Well it worked with the 32bit version. Well no more compiler errors at least. I thought i was dependent on your OS instead of the compiler. Well I'm getting a new error... For anyone curious it says "The application was unable to start correctly (Ox000007b) click OK to close the application".
.
This link says this error occurs when trying to run a 32 bit  program in a 64 bit environment.

http://uk.answers.yahoo.com/question/index?qid=20130519080507AAC56Pn


AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: Trouble getting set up.
« Reply #8 on: July 24, 2013, 04:59:31 pm »
Did you replace the old 64bit dll's with the new 32bit dll's?


AlexAUT

Fordun

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Trouble getting set up.
« Reply #9 on: July 24, 2013, 05:49:37 pm »
Did that. Can't believe i let that slip my mind. Well now it compiles fine. It just doesn't display anything and crashes after a few seconds. A very uninformative error message displays "SFML Project.exe has stopped working"

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: Trouble getting set up.
« Reply #10 on: July 24, 2013, 07:00:19 pm »
Are u sure that you have replaced all the old files? DId you try the debugger(Debugmode and click at the red play button)?

Can you post your code? Except you use an example code from the website.



AlexAUT

Fordun

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Trouble getting set up.
« Reply #11 on: July 24, 2013, 07:43:15 pm »
Here is what the debugger is giving me.


AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: Trouble getting set up.
« Reply #12 on: July 24, 2013, 07:56:23 pm »
Maybe you should simply delete all files and follow the tutorial step by step again. Now with the right SFML-package from the beginning.



AlexAUT

Fordun

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Trouble getting set up.
« Reply #13 on: July 24, 2013, 08:08:46 pm »
Did that. It seems to have removed some errors. Still one left though.


eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Trouble getting set up.
« Reply #14 on: July 24, 2013, 08:21:02 pm »
Can you please provide the code you're using?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything