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 - BillH

Pages: [1]
1
General / creating template for projects
« on: May 14, 2013, 05:33:07 pm »
how can I create a template project in sfml which is already set up with my most common lib and includes etc and where do I save it?

2
General / Re: [SFML 2.0] Getting mouse input/coordinates
« on: May 04, 2013, 03:14:39 pm »
I wasn't 'reviving an old thread' merely passing on a comment that I thought might be of interest to other users!

3
General / Re: [SFML 2.0] Getting mouse input/coordinates
« on: May 03, 2013, 08:59:02 pm »
I tried the sf::Mouse::getPosition(window).y and for some reason (although the function works OK by the way!) the x and y co-ordinates seem to be the wrong way round

4
Graphics / Re: program crashes when trying to use new font
« on: April 27, 2013, 05:10:18 pm »
Just to confirm: when linking to static libraries the problem does NOT occur and it runs perfectly. I have tried it with a number of different fonts. I don't know whether this means there is a problem with sfml dynamic library or something else. by the way Laurent I took your advice and am studying how to use the debugger properly! ;)

5
Graphics / Re: program crashes when trying to use new font
« on: April 24, 2013, 01:31:13 pm »
Thanks Laurent,your comments are really appreciated.  I will take note of what you said about using the debugger.

Meanwhile an update: I decided to try linking to the static libraries instead of the dynamic ones and the program compiles and runs with no problems

6
Graphics / Re: program crashes when trying to use new font
« on: April 24, 2013, 08:14:58 am »
Hi Laurent. Thanks for your reply. Apologies for not formatting code block correctly.

When I ran the debugger it gave the following output, I don't know if this will help but here goes:

output screen from Debug:

'example2.exe': Loaded 'C:\Users\Bill\Documents\Visual Studio 2010\Projects\example2\Debug\example2.exe', Symbols loaded.
'example2.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Users\Bill\Documents\Visual Studio 2010\Projects\example2\Debug\sfml-graphics-2.dll', Binary was not built with debug

information.
'example2.exe': Loaded 'C:\Users\Bill\Documents\Visual Studio 2010\Projects\example2\Debug\sfml-window-2.dll', Binary was not built with debug

information.
'example2.exe': Loaded 'C:\Users\Bill\Documents\Visual Studio 2010\Projects\example2\Debug\sfml-system-2.dll', Binary was not built with debug

information.
'example2.exe': Loaded 'C:\Windows\SysWOW64\msvcr100.dll', Symbols loaded.
'example2.exe': Loaded 'C:\Windows\SysWOW64\msvcp100.dll', Symbols loaded.
'example2.exe': Loaded 'C:\Windows\SysWOW64\opengl32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\glu32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\ddraw.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\dciman32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\setupapi.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\cfgmgr32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\oleaut32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\devobj.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\dwmapi.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\winmm.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'example2.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'example2.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\uxtheme.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\ig4icd32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\version.dll', Cannot find or open the PDB file
'example2.exe': Unloaded 'C:\Windows\SysWOW64\version.dll'
'example2.exe': Loaded 'C:\Windows\SysWOW64\dinput.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\hid.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\wintrust.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\crypt32.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\msasn1.dll', Cannot find or open the PDB file
'example2.exe': Loaded 'C:\Windows\SysWOW64\clbcatq.dll', Cannot find or open the PDB file
First-chance exception at 0x72621f34 (msvcr100.dll) in example2.exe: 0xC0000005: Access violation reading location 0x023c5000.
Unhandled exception at 0x72621f34 (msvcr100.dll) in example2.exe: 0xC0000005: Access violation reading location 0x023c5000.



7
Graphics / program crashes when trying to use new font
« on: April 23, 2013, 09:43:24 pm »
Newbie again

I have recently started learning SFML and have managed quite well so far. I have a program which displays a number of circles and a rectangle in a graphics window (I know it's not very exciting). This works perfectly but, when I tried to add a font I get an error: "example.exe has stopped working". If I comment out the references to the new font it runs OK again. I am using VS 2010 with sfml 2.0 rc.

I have included the code I wrote complete with the references to the new font, commented out.

Sorry if this is just another stupid problem but I really am a complete beginner to SFML and I have looked at the documentation and googled the problem with no luck, so any advice is welcome.

Thanks

-----------------------------------------------------------------Code follows-----------------------------------

 
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>



int main()
{
       

        sf::RenderWindow window(sf::VideoMode(1000, 600),"SFML works!");
        window.setPosition(sf::Vector2i(550,100));



/*
         sf::Font fnew;
         if(!fnew.loadFromFile("c:/windows/fonts/comic.ttf"))  
                {
                return 1;
                }
*/





       
       
       

       

 
    sf::CircleShape shape(10.f);//-----------------------------------diameter
    shape.setFillColor(sf::Color::Yellow);
        shape.setPosition(250,350);//-------------------position x,y

        sf::CircleShape shape1(20.f);//-----------------------------------diameter
    shape1.setFillColor(sf::Color::Red);
        shape1.setPosition(350,350);//-------------------position x,y

   sf::CircleShape shape2(30.f);//-----------------------------------diameter
    shape2.setFillColor(sf::Color::Green);
        shape2.setPosition(450,350);//-------------------position x,y

   sf::CircleShape shape3(40.f);//-----------------------------------diameter
    shape3.setFillColor(sf::Color::Yellow);
        shape3.setPosition(550,350);//-------------------position x,y

        sf::RectangleShape rec;

         rec.setSize(sf::Vector2f(800, 150));
         rec.setOutlineColor(sf::Color(255,0,0,150));
         rec.setFillColor(sf::Color(255,255,255,100));
         rec.setOutlineThickness(5);
         rec.setPosition(100, 20);

                sf::Text text("Test of text for graphics window");

                text.setCharacterSize(30);
                text.setColor(sf::Color::Green);
                text.setPosition(150,20);
                text.setRotation(0.f);//rotates text
                text.setScale(1.f,1.f);//changes size

//              text.setFont(fnew);                            


 while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
                       
            if (event.type == sf::Event::Closed)
                window.close();
        }
               
                window.clear(sf::Color::Blue);
                window.draw(shape);
                window.draw(text);
                window.draw(shape1);
                window.draw(shape2);
                window.draw(shape3);
                window.draw(rec);
       

        window.display();
    }

    return 0;
}
 

8
General / Re: linker problem with SFML and vs 2008
« on: April 21, 2013, 06:47:04 pm »
eXpl0it3r - Thanks for the info I will give version 2 a try then, with vs2010.
thanks again :)

9
General / Re: linker problem with SFML and vs 2008
« on: April 21, 2013, 06:05:00 pm »

Thanks eXpl0it3r.
I have installed vs 2010 and will try the exercise tutorial on that.

 I looked on the sfml website and it describes version 2 as 'release candidate, which I take to mean as beta (test) version. i am not keen to try this version at the moment as, being new to learning sfml, if any errors do occur I would not know whether the program or myself was the fault.

10
General / Re: linker problem with SFML and vs 2008
« on: April 21, 2013, 02:23:31 pm »
Thanks but I already checked that. As I said I have had no problems with the previous tutorials and I have taken the same steps to set this one up. I am obviously missing something and I just can't see what. Sorry to keep asking what are probably silly questions but I am fairly new to SFML.

11
General / linker problem with SFML and vs 2008
« on: April 21, 2013, 08:22:48 am »
Hi there. I am just learning SFML and have been working my way through the example tutorials on version 1.6.

I have had no problems up to now but, trying the 'drawing basic shapes' tutorial I keep getting linker errors: e.g. fatal error LNK1104: cannot open file 'sfml-graphics.lib.

I have set up the compiler and linker properties exactly the same as all the previous tutorials yet I keep getting this error with this one. Has anyone got any idea what I might be doing wrong?

Thanks in advance for any help.

12
General discussions / Re: SFML Project Wizard for Visual Studio 2010
« on: April 20, 2013, 09:42:45 pm »
I'm quite new to sfml so please could you tell me how to use the wizard after it's downloaded and installed?

Pages: [1]
anything