SFML community forums

General => SFML wiki => Topic started by: Ard on March 01, 2010, 06:38:56 pm

Title: Need HOWTO tutorial for setup SMFL with eclipse CDT
Post by: Ard on March 01, 2010, 06:38:56 pm
Hello!
I will be very grateful if somebody can describe this subject!
Title: Need HOWTO tutorial for setup SMFL with eclipse CDT
Post by: Krosan on March 01, 2010, 08:41:58 pm
compiler?

at linux gcc -> like descripted here Installing SFML  http://www.sfml-dev.org/tutorials/1.5/start-linux.php

+ libary settings in eclipse
sfml-graphics
sfml-window
sfml-system

cu
Title: HOWTO tutorial to setup SMFL with Eclipse CDT
Post by: bryanww on February 14, 2011, 12:35:17 am
This is long after the OP, but I just successfully set up Eclipse to compile and run the SFML hello world example on WinXP.  I think it would be a great idea to post the tutorial; I'm a professional Java developer so I eat, drink, and breathe Eclipse, meaning that for people like me, Eclipse CDT + SFML is an ideal solution for cross-platform game development.  Why?  Because I can leverage my existing knowledge of Java to manipulate assets (tools and editors).

Basically, I followed the installation how-to for the Code::Blocks IDE since Eclipse CDT also uses MinGW (by recommendation).  The install is perfectly analogous (almost one-to-one), and I had it running in several minutes.  I then tried installing Code::Blocks since it looks very interesting.  Once finished, I can now edit the same source code simultaneously in both IDEs (the project files do not conflict and the default output dirs also do not conflict).  It was so refreshing to have this work so cleanly out of the box that I wanted to share my steps.  Note that it's still important to have a good understanding of the concepts of search paths, compiling, and linking.

How-To Run SFML in Eclipse CDT (Windows, but *nix is similar)

Install the MinGW compiler and set up operating system PATH (Windows Only):

Install Eclipse IDE and the CDT plugin (for C++ development):

Build and Run the Hello World Program:
That should be it!  Hopefully this is helpful.  I think this is enough to post under the tutorials; if Laurent would feel so inclined, please feel free to add-to/repost as another installation tutorial.

Cheers,
Bryan
Title: portable?
Post by: Jayzan on June 18, 2011, 06:02:03 pm
Does anyone know if this will work with eclipse like this but from a usb drive?   I would like to use sfml, but since I'm often changing computers I like to use a usb flash drive to manipulate my code from the usb drive.
Title: Re: portable?
Post by: bryanww on July 26, 2011, 02:45:27 am
Quote from: "Jayzan"
Does anyone know if this will work with eclipse like this but from a usb drive?   I would like to use sfml, but since I'm often changing computers I like to use a usb flash drive to manipulate my code from the usb drive.


Yes it works really well if you merge your code.  Eclipse stores all of the important metadata in .project and .cproject.  I started collecting all of my resources on an external hard drive because I work on several machines.

I ran into this problem:  I'm working on Linux but my external drive is NTFS.  I keep it this way so I can work on Windows as well.  I couldn't build and run off the external drive because NTFS obviously lacks ext3 (or similar) permissions.  My distro disables execute privileges on ext3 by default.  So instead of trying to change it, I merge my source code between machine and external drive using Gnome Commander.  This is similar to what I do at work to make backups (to complement SVN), where I use Total Commander (Windows).  This setup works really well for me.
Title: Need HOWTO tutorial for setup SMFL with eclipse CDT
Post by: Quillraven on September 16, 2011, 09:05:32 am
thx for the tutorial, helped me a lot.

however i have 3 questions:
1) when i start the exe from eclipse, it doesn't really do anything. when i start it from the windows folder it works like a charm. can i change something to run it correctly from eclipse?

2) i hadn't to download mysy. i just downloaded the newest mingw and had to change 2 things in the bin folder of mingw. a) rename mingw32-make (or sthg like that) to just make and b) create a rm.bat file (or was is rn.bat?) with the following code: del all $* (or sthg like that. sorry cant remember the code exactly because i'm not at home right now to open the file).

3) when i create a sourcefolder and switch the "main.cpp" into it, i have to delete this autogenerated Default folder, where the binaries and exe file are in, and also i have to readd the library search folder and the libraries (sfml-system-d....). why is that?


regards
simon