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 - man with shell

Pages: [1]
1
General / Help understanding the tutorials?
« on: March 14, 2012, 09:38:36 pm »
I acknowledge that my first post was unfair. So, of course, I'm not upset about any rudeness.

For my part, I spent some six hours trying to make this stuff work, and ultimately, I was unable to compile the most basic program. This was somewhat humiliating for a person who has written working games in C++. I hope you will pardon my frustration.

In substantive response to Laurent, what I did not understand is that the DLLs are not needed until after compiling is complete. I thought this DLL copying was another step that needed to come before compiling (after all, it said, "Don't forget" like it's something that I should have done by now).

This post by VPellen is spectacular. I really appreciate the information.

EDIT:

I have fixed the problem. It's something I don't really understand; I'll try to explain it.

Yesterday, I thought I had to put the DLLs in the directory with my executable. I didn't have an executable yet, but I knew which directory Code::Blocks was going to put it in when I pushed "Build and Run". So I copied the DLLs to that target directory.

When I deleted those DLLs, the code ran fine. No more problems.

Again, I appreciate your time and effort.

2
General / Help understanding the tutorials?
« on: March 14, 2012, 05:34:55 am »
The tutorials are extremely unhelpful and unclear. Is it possible someone could write a coherent expanation of how to install SFML for use with Code::Blocks?

For an example of the uselessness of the tutorial, note this line:

"If you linked against the dynamic versions of the SFML libraries, donc forget to copy the corresponding DLLs (sfml-system.dll in this case) to your executable's directory, or to a directory contained in the PATH environment variable."

My executable's directory? I haven't made an executable yet; first I have to have code that compiles, THEN I have an executable. And what is this "PATH environment variable"?

Tutorials are supposed to be written for people who don't already know these things.

At present, I believe I have followed the tutorial as well as I can. I have added the "lib" and "include" directories under the "Search Directories" tab, and I have added the item "-lsfml-system-s" to the "Other linker options" list in the "Project build options" window. I used "-s" because I did not understand the instructions for using the dynamic libraries.

The code of my project in its entirety:

Code: [Select]
#include <SFML/System.hpp>
#include <iostream>

int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }

    return 0;
}



The errors:
Quote
undefined reference to `sf::Clock::GetElapsedTime() const
undefined reference to `sf::Sleep(float)
undefined reference to `sf::Clock::GetElapsedTime() const
undefined reference to `sf::Clock::Clock()


Please help?

Pages: [1]
anything