Bonjour, bonsoir
EDIT: Le fichier principal n'était tout simplement pas dans le bon format(ça commence bien, pour la suite je le sens pas trop), je n'avais pas regardé les logs attentivement. Merci a G. pour cette remarque
Je rencontre un probleme lors du build de mon projet qui m'indique "error: unknown type name ''namespace".
J'ai essayé tous les SFML avec le gcc (32B et 64B) et aussi avec une version compilée par moi même mais sans résultats. J'ai aussi essayé de la lier dynamiquement et statiquement et j'obtient toujours la même erreur.
J'ai testé la version sous VStudio 2010 et la ça a fonctionné or je ne suis pas du tout fan de VStudio.
J'ai la version 4.7.1 de gcc avec MinGW 32B
Merci d'essayer dans la mesure du possible de m'aider.
Mon Build Messages:
||=== SFML code, Debug ===|
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include\SFML\Config.hpp|129|error: unknown type name 'namespace'|
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include\SFML\Config.hpp|130|error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token|
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include\SFML\System\Time.hpp|34|error: unknown type name 'namespace'|
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include\SFML\System\Time.hpp|35|error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token|
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include\SFML\System\Clock.hpp|35|error: unknown type name 'namespace'|
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include\SFML\System\Clock.hpp|36|error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token|
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include\SFML\System\Err.hpp|32|fatal error: ostream: No such file or directory|
||=== Build finished: 7 errors, 0 warnings (0 minutes, 0 seconds) ===|
Mon Build Log:
-------------- Build: Debug in SFML code (compiler: GNU GCC Compiler)---------------
mingw32-gcc.exe -Wall -g -g -IC:\Users\Asce505\Documents\Programmation\SFML-2.0\include -c "C:\Users\Asce505\Documents\Programmation\SFML\SFML code\main.c" -o obj\Debug\main.o
In file included from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/System.hpp:32:0,
from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/Window.hpp:32,
from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/Graphics.hpp:32,
from C:\Users\Asce505\Documents\Programmation\SFML\SFML code\main.c:1:
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/Config.hpp:129:1: error: unknown type name 'namespace'
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/Config.hpp:130:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/System/Clock.hpp:32:0,
from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/System.hpp:33,
from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/Window.hpp:32,
from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/Graphics.hpp:32,
from C:\Users\Asce505\Documents\Programmation\SFML\SFML code\main.c:1:
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/System/Time.hpp:34:1: error: unknown type name 'namespace'
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/System/Time.hpp:35:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/System.hpp:33:0,
from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/Window.hpp:32,
from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/Graphics.hpp:32,
from C:\Users\Asce505\Documents\Programmation\SFML\SFML code\main.c:1:
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/System/Clock.hpp:35:1: error: unknown type name 'namespace'
C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/System/Clock.hpp:36:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
In file included from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/System.hpp:34:0,
from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/Window.hpp:32,
from C:\Users\Asce505\Documents\Programmation\SFML-2.0\include/SFML/Graphics.hpp:32,
from C:\Users\Asce505\Documents\Programmation\SFML\SFML code\main.c:1:
C:\Users\Asce505\Documents\Programmation\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)
Mon main.cpp (Le seul fichier du projet):
#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;
}