SFML community forums
Help => General => Topic started by: cpl on January 24, 2009, 07:45:09 pm
-
Hi,
This is basically what I want to do:
#include <SFML/System.hpp>
int main()
{
sf::AClock Clock;
//Do something with clock
return 0;
}
I want to add AClock.hpp and AClock.cpp to the System.hpp.
I have never done that before and I can't get it to work.
I'm using SFML v1.4 and CodeBlocks with MinGW on Windows XP.
I have tried a bit but I keep getting this error message "undefined reference to `sf::AClock::AClock(bool)'"
Any help is appreciated.
________
Ford Sierra history (http://www.ford-wiki.com/wiki/Ford_Sierra)
-
???
Why do you want to do that?
-
???
Why do you want to do that?
Since I use AClock in every project (and many other files as well) I thought it would be easier.
And I know this is not the best solution but for now I wanna do this :)
________
easy vape (http://www.vaporshop.com/easy-vape-vaporizer.html)
-
You use them, but the other don't. :wink:
You can make your own "add-on lib" to the SFML, if you want.
I don't understand why this should help...
-
Adding things to a "foreign" namespace is never a good idea, and it can lead to confusion when others are reading your code.
Why don't you just use another namespace like mysf:: or whatever? ;)
-
A friend helped me out today with this. Now it works perfectly.
I know this is generally a bad idea but at least now I got it to work...
________
iolite reviews (http://vaporizers.net/iolite-vaporizer)
-
You should really not do this. Just create your own library.
-
You should really not do this. Just create your own library.
Yeah, I might do that if things starts to mess up. However this works pretty well right now and I think I'm gonna keep it this way (for now).
________
n02 vaporizer (http://no2vaporizers.com)
-
You should really not do this. Just create your own library.
Yeah, I might do that if things starts to mess up. However this works pretty well right now and I think I'm gonna keep it this way (for now).
When it stops working, you're going to have no idea why and get cryptic linker errors or erratic behavior. Seriously. Don't do this. You don't really gain anything by stomping on SFML namespace anyway.