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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Atifhossain

Pages: [1]
1
General / Re: How to block window resize ?
« on: March 17, 2013, 12:38:27 pm »
Code: [Select]

sf::RenderWindow App ( sf::VideoMode (500,500) , "SFML App" , sf::Style::Close) ;


That's all I do. ;)

2
Graphics / Re: SFML text class not working
« on: March 15, 2013, 08:57:20 am »
Hey thanks everybody ! It 's working fine now  :D

4
Graphics / [SOLVED]SFML text class not working
« on: March 14, 2013, 08:55:31 pm »
Here's the code


#include <SFML/Graphics.hpp>

int main ()
{
     sf::RenderWindow App (sf::VideoMode(447,340), "SFML App");

     sf::Text text("Hello");


    while (App.isOpen())
    {
        sf::Event Event;

        while (App.pollEvent(Event))
        {
            if (Event.type == sf::Event::Closed)
            App.close();

        App.clear();
        App.draw(text);
        App.display();
        }

     }

}

 

It says :
error : no matching function for call to 'sf::Text::Text(const char [6])'



5
I downloaded SFML with this tutorial : http://www.sfml-dev.org/tutorials/2.0/start-cb.php

I recently downloaded SFML 2.0 RC from here  : http://www.sfml-dev.org/download.php. I dloaded this one
C++ | Version 2.0 RC >>  Windows 32 bits - GCC DW2 (11.5 MB).

I did all that was written in the tutorial. I used the dynamic version of SFML and moved all the required dlls. Created an empty project and entered this code in main.cpp
By the way, I use Code::Blocks IDE. I did not install C::B with the MinGW compiler.

Code: [Select]

#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;
}



Here's the build message :

-------------- Build: Debug in SFMLtest (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall  -g    -ID:\Atif\SFML\SFML-2.0-rc\include -IC:\MinGW\include  -c D:\Atif\SFMLtest\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -LD:\Atif\SFML\SFML-2.0-rc\lib  -o bin\Debug\SFMLtest.exe obj\Debug\main.o    -lsfml-graphics -lsfml-window -lsfml-system  -mwindows
Output size is 45.25 KB
Process terminated with status 0 (0 minutes, 1 seconds)
0 errors, 0 warnings (0 minutes, 1 seconds)


When I Run it , it says :

Checking for existence: D:\Atif\SFMLtest\bin\Debug\SFMLtest.exe
Executing: "D:\Atif\SFMLtest\bin\Debug\SFMLtest.exe"  (in D:\Atif\SFMLtest\.)
Process terminated with status -1073741819 (0 minutes, 0 seconds)


What should I do ?

Pages: [1]
anything