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

Author Topic: Installing sfml with code block  (Read 4280 times)

0 Members and 2 Guests are viewing this topic.

rahul8590

  • Newbie
  • *
  • Posts: 25
    • View Profile
Installing sfml with code block
« on: March 13, 2010, 10:51:26 pm »
I have installed the sfml according to the instruction given in the site .
Like i have placed the .h files in include folder and also placed the lib files in lib folder.
in ht linker settings . i have linked linked all the e3 in order .
Though i am compiling the normal program , i am getting an error saying

parse
parse

in line 85 and 97 of file Unicode.hpp

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Installing sfml with code block
« Reply #1 on: March 13, 2010, 11:12:37 pm »
The error is just saying "parse parse"? :lol:

It probably says more, look at the detailed compiler log ;)
Laurent Gomila - SFML developer

rahul8590

  • Newbie
  • *
  • Posts: 25
    • View Profile
Installing sfml with code block
« Reply #2 on: March 13, 2010, 11:54:52 pm »
-------------- Build: Debug in sfml ---------------

Compiling: main.cpp
In file included from C:/Program Files/CodeBlocks/MinGW/include/SFML/System.hpp:39,
                 from H:/Graphic Program/sfml/main.cpp:1:
C:/Program Files/CodeBlocks/MinGW/include/SFML/System/Unicode.hpp:85: parse
   error before `&' token
C:/Program Files/CodeBlocks/MinGW/include/SFML/System/Unicode.hpp:97: parse
   error before `)' token
Process terminated with status 1 (0 minutes, 0 seconds)
2 errors, 0 warnings

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Installing sfml with code block
« Reply #3 on: March 14, 2010, 12:02:51 am »
What version of gcc are you using? You should probably upgrade your MinGW installation.
Laurent Gomila - SFML developer

rahul8590

  • Newbie
  • *
  • Posts: 25
    • View Profile
Installing sfml with code block
« Reply #4 on: March 14, 2010, 04:47:15 am »
The mingW version is 3.1.0  ,
Gcc version is 0.99

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Installing sfml with code block
« Reply #5 on: March 14, 2010, 11:37:10 am »
Quote
Gcc version is 0.99

:shock:
You should really upgrade.
Laurent Gomila - SFML developer

rahul8590

  • Newbie
  • *
  • Posts: 25
    • View Profile
Installing sfml with code block
« Reply #6 on: March 14, 2010, 04:36:20 pm »
Sorry , the one i previously posted isnt my Gcc version . ITs a version for a file compiler.dll
i misunderstood .
The MinGw version is 3.2
I guess thats not that pretty old.

DO i still have to upgrade .. ?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Installing sfml with code block
« Reply #7 on: March 14, 2010, 06:49:49 pm »
Quote
The MinGw version is 3.2

I'm not familiar with MinGW versions, you should rather check the gcc one (type "mingw32-gcc -v").
Laurent Gomila - SFML developer

rahul8590

  • Newbie
  • *
  • Posts: 25
    • View Profile
Installing sfml with code block
« Reply #8 on: March 15, 2010, 07:21:35 pm »
Got partial success .

I finally installed the latest ones  and the basic program  is running , thats is the clock one .
But when i am trying to execute another program which uses AUdio.hpp

where i am passsing test.mp3 as the input , i am getting some reference errors .

Quote

Compiling: C:\Documents and Settings\rahul\Desktop\audio-music.cpp
Linking console executable: C:\Documents and Settings\rahul\Desktop\audio-music.exe
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x185): undefined reference to `sf::Music::Music(unsigned int)'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x1dc): undefined reference to `sf::Music::OpenFromFile(std::string const&)'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x2ba): undefined reference to `sf::Music::~Music()'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x302): undefined reference to `sf::Music::GetDuration() const'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x359): undefined reference to `sf::SoundStream::GetSampleRate() const'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x3b0): undefined reference to `sf::SoundStream::GetChannelsCount() const'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x407): undefined reference to `sf::SoundStream::Play()'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x440): undefined reference to `sf::SoundStream::GetStatus() const'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x4c7): undefined reference to `sf::Music::~Music()'
C:\Documents and Settings\rahul\Desktop\audio-music.o:audio-music.cpp:(.text+0x4f4): undefined reference to `sf::Music::~Music()'
collect2: ld returned 1 exit status


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Installing sfml with code block
« Reply #9 on: March 15, 2010, 07:25:47 pm »
If you use the audio module you must link to the audio library, which is sfml-audio.

And you won't be able to read a MP3 music, SFML doesn't support this format. You can use OGG instead, it is equivalent but free.
Laurent Gomila - SFML developer

rahul8590

  • Newbie
  • *
  • Posts: 25
    • View Profile
Installing sfml with code block
« Reply #10 on: March 16, 2010, 08:40:59 am »
well .. regarding audio , as of now i am not much concerned about it . But i have a few queries regarding opengl .
The sample program ran and it was great :D  But the problem is , i have also developed a small game in it and it has few window key events , will those still be functional if i run it under sfml , since the sfml has its own way of handling it , i was thinking there should not be any problem.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Installing sfml with code block
« Reply #11 on: March 16, 2010, 08:46:26 am »
SFML can handle key events, of course ;)
Laurent Gomila - SFML developer

rahul8590

  • Newbie
  • *
  • Posts: 25
    • View Profile
Installing sfml with code block
« Reply #12 on: March 16, 2010, 08:59:12 am »
No , i mean i have used the key events of opengl not sfml . Will that not cause any problem .

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Installing sfml with code block
« Reply #13 on: March 16, 2010, 09:10:05 am »
OpenGL doesn't handle events. You probably use another library that creates the window and the OpenGL context (such as GLUT or SDL), if you use SFML you must get rid of it. SFML provides its own windows and events.
Laurent Gomila - SFML developer

 

anything