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

Author Topic: [SOLVED] Installing SFML 2.0 help?  (Read 5348 times)

0 Members and 1 Guest are viewing this topic.

greffin28

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
[SOLVED] Installing SFML 2.0 help?
« on: May 12, 2013, 02:04:48 pm »
so i'm new to SFML and i've been following the instruction from here: (http://www.sfml-dev.org/tutorials/2.0/start-cb.php) and i've got this error help?

-------------- Build: Debug in SFML Test (compiler: GNU GCC Compiler)---------------

mingw32-gcc.exe -Wall  -g    -I..\..\CodeBlocks\SFML-2.0\include  -c "D:\Greffin\C++ 2010\SFML Test\main.c" -o obj\Debug\main.o
In file included from ..\..\CodeBlocks\SFML-2.0\include/SFML/System.hpp:32:0,
                 from ..\..\CodeBlocks\SFML-2.0\include/SFML/Window.hpp:32,
                 from ..\..\CodeBlocks\SFML-2.0\include/SFML/Graphics.hpp:32,
                 from D:\Greffin\C++ 2010\SFML Test\main.c:1:
..\..\CodeBlocks\SFML-2.0\include/SFML/Config.hpp:129:1: error: unknown type name 'namespace'
..\..\CodeBlocks\SFML-2.0\include/SFML/Config.hpp:130:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from ..\..\CodeBlocks\SFML-2.0\include/SFML/System/Clock.hpp:32:0,
                 from ..\..\CodeBlocks\SFML-2.0\include/SFML/System.hpp:33,
                 from ..\..\CodeBlocks\SFML-2.0\include/SFML/Window.hpp:32,
                 from ..\..\CodeBlocks\SFML-2.0\include/SFML/Graphics.hpp:32,
                 from D:\Greffin\C++ 2010\SFML Test\main.c:1:
..\..\CodeBlocks\SFML-2.0\include/SFML/System/Time.hpp:34:1: error: unknown type name 'namespace'
..\..\CodeBlocks\SFML-2.0\include/SFML/System/Time.hpp:35:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from ..\..\CodeBlocks\SFML-2.0\include/SFML/System.hpp:33:0,
                 from ..\..\CodeBlocks\SFML-2.0\include/SFML/Window.hpp:32,
                 from ..\..\CodeBlocks\SFML-2.0\include/SFML/Graphics.hpp:32,
                 from D:\Greffin\C++ 2010\SFML Test\main.c:1:
..\..\CodeBlocks\SFML-2.0\include/SFML/System/Clock.hpp:35:1: error: unknown type name 'namespace'
..\..\CodeBlocks\SFML-2.0\include/SFML/System/Clock.hpp:36:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from ..\..\CodeBlocks\SFML-2.0\include/SFML/System.hpp:34:0,
                 from ..\..\CodeBlocks\SFML-2.0\include/SFML/Window.hpp:32,
                 from ..\..\CodeBlocks\SFML-2.0\include/SFML/Graphics.hpp:32,
                 from D:\Greffin\C++ 2010\SFML Test\main.c:1:
..\..\CodeBlocks\SFML-2.0\include/SFML/System/Err.hpp:32:19: fatal error: ostream: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minutes, 0 seconds)
7 errors, 0 warnings (0 minutes, 0 seconds)
« Last Edit: May 12, 2013, 02:35:04 pm by greffin28 »

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Installing SFML 2.0 help?
« Reply #1 on: May 12, 2013, 02:11:58 pm »
Don't compile as C code. Use g++ instead of gcc.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

greffin28

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Installing SFML 2.0 help?
« Reply #2 on: May 12, 2013, 02:32:29 pm »
hey thankss i didn't see the extension there haha foolish me i guess :) thank you again.

wvtrammell

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
Installing SFML 2.0 help?
« Reply #3 on: May 13, 2013, 05:42:58 pm »
Hi
I  down loaded file SFML 2.0 Clang (OS X 10.8+)
on a machine using OSX 10.8.3 and Xcode 4.6.2.
I downloaded the 2.0 tutorial SFML & Xcode (Mac  OS X.)
I followed the instructions in paragraph "Installing SFML" :
copy contents of Frameworks to /Library/Frameworks.
copy sndfile.framework & freetype.framework from extlib
to /Library/ Frameworks
copy sfml from templates to /Library/Developer/Xcode/templates.
In Xcode I chose the options shown in the tutorial for a new project.
C++98  ith GCC and libstdc++ and target 10.5
Universal
Frameworks
Use window, graphic,audio, & network module.
The project navigator displays all the files shown in tutorial.
After compile:

25 Errors read:
Apple Mach -O Linker (ld) Error etc etc etc.

If I use C++11 with clang and libc++ instead of the suggested compiler
I get only 2 linker errors

Any one else having this problem with this configuration?

Thanks
Warren Trammell

zsbzsb

  • Hero Member
  • *****
  • Posts: 1409
  • Active Maintainer of CSFML/SFML.NET
    • View Profile
    • My little corner...
    • Email
Re: Installing SFML 2.0 help?
« Reply #4 on: May 13, 2013, 07:14:58 pm »
Hi
I  down loaded file SFML 2.0 Clang (OS X 10.8+)
on a machine using OSX 10.8.3 and Xcode 4.6.2.
I downloaded the 2.0 tutorial SFML & Xcode (Mac  OS X.)
I followed the instructions in paragraph "Installing SFML" :
copy contents of Frameworks to /Library/Frameworks.
copy sndfile.framework & freetype.framework from extlib
to /Library/ Frameworks
copy sfml from templates to /Library/Developer/Xcode/templates.
In Xcode I chose the options shown in the tutorial for a new project.
C++98  ith GCC and libstdc++ and target 10.5
Universal
Frameworks
Use window, graphic,audio, & network module.
The project navigator displays all the files shown in tutorial.
After compile:

25 Errors read:
Apple Mach -O Linker (ld) Error etc etc etc.

If I use C++11 with clang and libc++ instead of the suggested compiler
I get only 2 linker errors

Any one else having this problem with this configuration?

Thanks
Warren Trammell

It is usually more helpful to us and to yourself to start a new thread with your problem. This thread already has "[Solved]" in the thread title so not a lot of people will click this to try to answer a new problem.

To start make your own thread and post the exact error message you are getting.

Quote
25 Errors read:
Apple Mach -O Linker (ld) Error etc etc etc.

That is not very helpful when you cover the error message up with "ect ect ect". Post what is contained in there.
Motion / MotionNET - Complete video / audio playback for SFML / SFML.NET

NetEXT - An SFML.NET Extension Library based on Thor

 

anything