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

Pages: [1]
1
General / Re: Static linking help 2.0
« on: November 08, 2012, 11:09:03 am »
Just downloaded DW2, cleaned and tried again and it works! I didn't think it would be that since it worked with dynamic.
Sorry for being such a pain and thanks so much for your help. I'm all set up now, time to start learning!
Much appreciated, thanks again  :)

2
General / Re: Static linking help 2.0
« on: November 08, 2012, 10:45:22 am »
Tried cleaning and rebuilding and since then, no window opens at all, I just get loads of errors of this type (see attachment). I have tried starting a new project and pasting the code in but still the same problem.

[attachment deleted by admin]

3
General / Re: need help with a weird problem (working with files)
« on: November 07, 2012, 11:11:42 pm »
You can attach files by going to 'attachments and other options' underneath the text box when you are making a post. There is a 192kb limit though so I don't think you could really post a video.
I would just upload to youtube or something and link to it.  :)

4
General / Re: Static linking help 2.0
« on: November 07, 2012, 10:55:44 pm »
Haha, that is very true  :)
Sorry, I don't mean to waste your time but I've searched here, googled it and looked through the Code::Blocks manual and can't find it explained anywhere.

So doing what you said, the setup in the file I have attached should work but I still get the error.
Is there anything I'm doing wrong?


[attachment deleted by admin]

5
General / Re: Static linking help 2.0
« on: November 07, 2012, 10:32:24 pm »
Whoops, I didn't even notice the different debug and release options on the side. Just me being stupid then lol.   
But in my defense the tutorial isn't completely clear.

So now I've put the SFML_STATIC in the #defines section for global, debug and release. Is that right? Or should it just be global?
And I've also put the debug and release libraries in the right place in linker settings, but what do I put in the linker settings for global? The release libraries again?
Also, do I need to do the search directories for all three or just global?

I've tried a few different configurations but can't get it working.
Here's it is again.

[attachment deleted by admin]

6
General / Re: Static linking help 2.0
« on: November 07, 2012, 09:32:04 pm »
It says: "This program can't start because 'sfml-window-2.dll' is missing from your computer.". But if I link to the bin folder (which contains that file) in the project's build options, under linker in the search directories, it works. But it doesn't say I need to do that in the tutorial so I don't know if it's what I should be doing, or just a workaround.

(The program is just a couple of bits from the tutorial pasted to test the keyboard event I was having trouble with in the previous version.)

[attachment deleted by admin]

7
General / Static linking help 2.0
« on: November 07, 2012, 06:17:09 pm »
Hi everyone,

I'm new to SFML so I have been following the tutorials religiously! Got everything working with dynamic linking in 2.0 but the instructions for static linking don't seem to be working. Tried the debug version and release libraries but it keeps asking for the dll files in the bin folder. So I tried linking  to the bin folder and it works but the tutorial says you only need to link to the lib folder so I am bit confused.

Should I be linking to the lib folder or the bin folder or perhaps both?

Thanks in advance.

(Code::blocks, MinGW 4.4, Windows 7)

8
Window / Re: Some keys not registering to close window
« on: November 07, 2012, 06:05:55 pm »
Downloaded SFML 2.0 and made a new version and it works fine. I'm having a bit of trouble with linking to static libraries though so maybe I'll start a new topic. Anyway, problem solved, thanks!

(Sorry, emailed you because I thought you had closed the topic but it turns out I was auto logged out lol! Just posted this to let others know it's been resolved.)

9
Window / Re: Some keys not registering to close window
« on: November 06, 2012, 11:04:05 pm »
No, UK. It's a Samsung laptop, I dunno if that changes anything.
I've been testing some others and it's still seems its only the F keys and arrow keys that work. Return, Space, Backspace etc. don't and neither do any of the letter keys. Not sure how to do numbers though.

10
Window / Re: Some keys not registering to close window
« on: November 06, 2012, 10:48:46 pm »
Thanks for the fast reply!
I'm using Code::Blocks with MinGW 4.4 on Windows 7 home premium.
Here's the code:

// Window

#include <sfml/System.hpp>
#include <sfml/Window.hpp>
#include <iostream>

int main()
{
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML window");

    while (App.IsOpened())
    {
        sf::Event Event;
        while (App.GetEvent(Event));
        {
            if (Event.Type == sf::Event::Closed)
                App.Close();

            if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
                App.Close();
        }
        App.Display();
    }
    return EXIT_SUCCESS;
}
 


11
Window / Some keys not registering to close window
« on: November 06, 2012, 10:38:31 pm »
Hello, I'm a complete SFML rookie so I've been reading through the tutorials on the site.
I've got to the one that talks about using events to close the window and I've copied the code exactly.
This is the bit that handles the events:

        sf::Event Event;
        while (App.GetEvent(Event));
        {
            if (Event.Type == sf::Event::Closed)
                App.Close();

            if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
                App.Close();
        }

The program runs fine and closes properly when I press the X but pressing escape does nothing.
I tried F5 because that was a key given in another example and it worked! Also, none of the letter keys work but the arrow keys do. It seems strange that some work and some don't.

I'm probably missing something really obvious but if anyone can help me solve this it would be much appreciated.

Thanks!

Pages: [1]