Hey guys, I've been trying to get SFML set up for C++ with Netbeans 6.9.1 on Windows 7, a bit lost! I found [url=http://trevoke.net/blog/2009/03/08/howto-sfml-with-netbeans/]this[/url] but it's for Linux, and I'm not entirely sure what I'm to download - if the process can even be applied here.
Any help? Is this even possible?
Download the SDK, copy the DLL files and headers to your project, dynamically link to SFML
Sorry, how would I go about doing that? I've just downloaded SFML-1.6 for MinGW and extracted it, not certain on what to do next.
If you would like to use Code::Blocks instead, there's a good guide on the SFML website which was pretty easy and worked very well for me.
I actually used Code::Blocks for a while actually but am more won over by Netbeans' simplicity. If what I'm trying to do here isn't possible with Netbeans I'd happily switch back though!
I don't know NetBeans for C++, but surely when you've set up a project you can change some project settings and there should be options for further include paths and libraries to link against. Just search around in the compiler and linker settings.
Okay, I basically followed that tutorial exactly. Added SFML/include to the Code Assistance C++ compiler thing, added it in Include Directories for the project, added the libraries in the linker (I've tried sfml-graphics, sfml-window and sfml-system with the -s, -d and standalone suffixes and they all produce the same result). I attempted to compile
[code]#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;
}
[/code]
but it resulted in this error: [url]http://pastebin.com/T1V1Yfwb[/url]
Help :(
Define the _WIN32 or __WIN32__ preprocessor token.
That got rid of the "does not support this operating system" error, thanks! However I'm still getting errors, and I noticed that when I just do a simple Hello World test without any SFML dependancies I get these errors:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lsfml-graphics
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lsfml-window
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -lsfml-system
Which makes me think I may have neglected something but as far as I can see everything's linked up fine - any suggestions? Sorry if it's a bit vague, I'm new to all of this and it's tricky to get started.
Sorry, you need to Log In to post a reply to this thread.