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

Pages: [1]
1
General discussions / Re: SFML 2.0 RC
« on: April 15, 2012, 05:58:06 pm »
haha the first error is on me!  :P

Go to your project build settings and at the bottom edit SFML_LINK_DYLIBS_SUFFIX to "" (empty). That's should do it.

(Project using frameworks are not affected by this issue.)
Thanks, works like a charm!

2
General discussions / Re: SFML 2.0 RC
« on: April 15, 2012, 05:01:44 pm »
Not sure if this is a bug or something I'm doing wrong, but after I ran the Mac installer and created a new SFML project in Xcode, I tried to build it and got an error:
Code: [Select]
ld: library not found for -lsfml-system-d

3
General / Re: Pre-compiled Mac libraries?
« on: April 15, 2012, 02:54:35 pm »
I 've managed to get the missing header files now.  It was because I was using an unofficial version of Xcode's command line tools (I didn't want to sign up for a dev ID) but it didn't have the latest headers because of licence issues.  I signed up for an ID in the end and download the official Xcode command command line tools and it worked  :D  I'll wait for the SFML 2.0 releasefor the new Xcode templates before I start coding.

4
General / Re: Pre-compiled Mac libraries?
« on: April 14, 2012, 07:41:19 pm »
SFML 2.0 RC will be available in a (very) few days. If you can wait until this release then you will be able to download an installer which will give you everything you need to use SFML on Mac.

However, if you want to use Eclipse for C++ development I must warn you : this IDE is not very good for this language. Regarding to Codeblocks : I've always end up having trouble with this IDE on Mac (not starting and stuff like that). So I still recommend Xcode on Mac OS X. Moreover, all Apple developer tools come with this application and not having Xcode can be an issue (not having some SDK – it's probably the reason of your missing headers – etc...).

Now, if you still want to use Codeblocks or Eclipse (or any IDE or any autotool or whatever) you don't need dylibs : frameworks work just fine. You only have to configure these tools to use them.
I'll wait until the 2.0 release then, which will hopefully work with the newest Xcode.  I didn't know I could use frameworks with other IDEs, I thought they were specific to Xcode, but the only reason I didn't want to use Xcode was because of the templates not working.  Thanks very much :)

5
General / Re: Pre-compiled Mac libraries?
« on: April 14, 2012, 05:46:32 pm »
I have compiled and used SFML with the latest Xcode on mac, I havent tried using another IDE however but it shouldn't be a problem sense I do have the dynlib files for SFML on my computer (after compiling it).

I used cmake, just ran cmake to create unix make files (not xcode), then ran the commands "make" and "sudo make install" from the folder where they where created by cmake in the console.

Oh I hade to add a line to the CMAKE_CXX_FLAG or it would crash any program that tried to create a empty sf:string, I dont have the exact line right now.
I tried this but I get compiler errors because of missing header files.  I did find someone else with this problem but they had no solution.  I even redownloaded and installed Xcode again, but it made no difference.  Could you upload the generated files?

6
General / Re: SFML-1.6 and Eclipse CDT
« on: April 14, 2012, 04:36:54 pm »
Simply searching Google for "sfml eclipse" brings up loads of tutorials on how to set it up:
http://www.google.co.uk/search?client=safari&rls=en&q=sfml+eclipse&ie=UTF-8&oe=UTF-8&redir_esc=&ei=HIuJT-vsCsHg8gOquZTpCQ
I found the one on Raz's Domain quite helpful :)

7
General / Pre-compiled Mac libraries?
« on: April 14, 2012, 04:32:30 pm »
The Mac download on the download page only has framework files for use with Xcode and templates for an old version.  I have the new Xcode so I can't use the templates, and I can't figure out how to set it up manually.  What I want to do is use a different IDE like Eclipse or Code::Blocks but I think they need the proper library files (dylib?) instead of the frameworks.  I tried building the libraries from the latest source code of SFML 2 but I don't have a lot of the header files it needs, which is probably because of the new Xcode version not installing them.  Does anyone have, or can compile, the native Mac libraries that I can use in different IDEs?

8
General / Sprite moving speed same on all computers
« on: November 13, 2011, 05:22:47 pm »
I have a player that is moved when the left or right arrows is pressed, and on my computer making him move by 0.5 (pixels?) every update looks OK.  But on other, faster computers there will be faster updates so the player will move faster, and slower on slower computers.  I've tried using a clock and moving the player using this alogarithm:
Code: [Select]
sprite.Move(speed / (1 / clock.GetElapsedTime()));
The clock will measure it in how many seconds it takes for an update to come (let's call it SPF for seconds per frame) so I've converted it to FPS (frames per second) by dividing 1 by it.  I've used this number to divide the speed by so the speed should, by my calculations, be how many pixels it moves every second.  But even having the speed at a high number like 200, the player moves very slowly.  I'm not sure I'm managing the fps very well.  Does anyone know how to make sure the sprite is moving the same speed on all computers?[/code]

9
Window / Stack around the variable 'app' was corrupted
« on: September 01, 2010, 12:41:39 pm »
Thanks, it worked.  They had nothing about this in the tutorials..

10
Window / Stack around the variable 'app' was corrupted
« on: September 01, 2010, 12:27:16 pm »
I'm trying to make a program, with Box2D for the physics, and SFML for the graphics.  However, I get a runtime error after I initialize sf::Window.  Here is my source code: (I'm not including the Box2D part)
Code: [Select]

#include "SFML/System.hpp"
#include "SFML/Window.hpp"
#include "SFML/Graphics.hpp"
#include <cstdio>
int main()
{
sf::Window app(sf::VideoMode(800, 600, 32), "Box2D SFML");
                for (int32 i = 0; i < 60; ++i)
{
app.Display();
}
return 0;
}

I get this runtime error:
Code: [Select]

Run-Time Check Failure #2 - Stack around the variable 'app' was corrupted.

What's happened?  I've got this working before...[/code]

11
Graphics / sf::Sprite error
« on: August 29, 2010, 07:12:05 pm »
I saw that but I don't have Code::Blocks and I couldn't find an option for it in Dev-C++, could you tell me where it is?

12
Graphics / sf::Sprite error
« on: August 29, 2010, 07:05:35 pm »
programmer47 (12)     Aug 29, 2010 at 4:35pm
Hi all,

I'm trying to display an image on the screen with SFML (using Dev-C++). An error occurs when I try to declare a sprite with sf::Sprite. This is my code:
Code: [Select]

#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
    sf::Image image;
    if (!image.LoadFromFile("image.tga"))
    {
       std::cout << "Error loading image!" << std::endl;
    }
    sf::Sprite sprite;
    sprite.SetImage(image);
    return 0;
}

This is the error:
Code: [Select]

variable 'vtable for sf::Sprite' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.

 


I have followed the tutorials on SFML-Dev.org, can anyone help prevent this error?
Code: [Select]

Pages: [1]
anything