Eclipse, code-blocks, or Visual Studio

Pages: 123
Jul 18, 2013 at 7:43pm
which one do you guys use? im not planing on changing the one i use but just asking.
Jul 18, 2013 at 7:46pm
closed account (Dy7SLyTq)
code::blocks when i have to, but otherwise notepad++ with mingw or vim with cygwin
Jul 18, 2013 at 8:08pm
Visual Studio if the microsoft compilers didn't suck so much.
So, Sublime Text.
Jul 18, 2013 at 8:11pm
yeah, but i rather have multiplatform support
Jul 18, 2013 at 8:12pm
I can agree with that. If I were to code on Windows I would use visual studio if the compilers supported C++11 as much as gcc or clang do. Instead I use Sublime Text and just compile via command line
Jul 18, 2013 at 8:12pm
Well VS is most definitely not multiplatform. It's a fantastic IDE, though. Code:Blocks is pretty great as well. Eclipse is just awful for C++ support IMO. It works pretty well for Java though.
Jul 18, 2013 at 8:18pm
well im useing eclipse and its easier for opengl type of stuff. if codeblocks worked easier with opengl i would use it.

plus i wish code-blocks was updated
Last edited on Jul 18, 2013 at 8:21pm
Jul 18, 2013 at 8:21pm
How is it any easier for that? That's all just getting your linker settings right.
Jul 18, 2013 at 8:22pm
for code-blocks opengl is C as default (i think)
Jul 18, 2013 at 8:25pm
I'm using OpenGL with code blocks. Don't choose the OpenGL template, just make an empty project, link the necessary libraries and add the right search paths in build options.
Jul 18, 2013 at 8:25pm
is there a tutorial for that somewhere?
Jul 18, 2013 at 8:30pm
for code-blocks opengl is C as default (i think)

That made no sense at all.
Jul 18, 2013 at 8:32pm
yeah now that i think about that i agree that it doesn't make any sense
Jul 18, 2013 at 8:33pm
is there a tutorial for that somewhere?

What's your operating system?
Jul 18, 2013 at 8:35pm
64 bit windows 7
Jul 18, 2013 at 8:57pm
Here is how I set it up for my project using SFML, GLEW, and openGL.

I made a folder in C:, which I called usr. Inside that folder I made a folder called include, and a folder called lib. Just a place to put libs and header files.

I downloaded SFML, and copied the folder called SFML which holds the SFML headers into C:/usr/include. I copied all of SFML's lib files into C:/usr/lib.

Then I downloaded GLEW, and I put the header files in C:/usr/include/GL, and libs in C:/usr/lib).

I chose C:/usr/include, and C:/user/lib, because linux has locations with similar names. There may be a better place in windows to put this stuff, I don't know.

Also on windows you need to put dll's provided by SFML and GLEW in the same location as your executable. I guess in your code blocks project folder in bin/Debug, and bin/Release.

Then in code blocks, in project->build options, select your whole project on the left, not just debug or release, and then click on linker settings. Add
glew32s
opengl32
glu32
sfm-graphics
sfml-window
sfml-system

, and any other sfml libs you want under Link Libraries. Then in search directories, I added c:/usr/lib under Linker, and c:/usr/include and my code::blocks project folder under compiler.

In compiler options I also selected have gcc follow C++11 or something like that.

My main.cpp looks something like this,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <windows.h>
#define GLEW_STATIC
#include <GL/glew.h>
#include <SFML/OpenGL.hpp>
#include <SFML/Window.hpp>
//#include various standard libraries
//some constants

int main() {

    sf::Window window(sf::VideoMode(WIDTH, HEIGHT), 
                      "SFML OpenGL", 
                      sf::Style::Default, 
                      sf::ContextSettings(24, 8, 4, 4, 0)); 
//last two parameters of cont. set. are openGL major and minor versions, 
//in this case, OpenGL 4.0

    glewExperimental = true;
    if (glewInit() != GLEW_OK)
        return -1;

    bool quite = false;
    while (! quit) {
        sf::Event event;
        while(window.pollEvent(event)) {
            if (event.type == sf::Event::Closed)
                quit = true;
        }
        //use sfml keyboard and mouse input stuff
        //use sfml clock stuff for timer

        //game.update(/*..*/);
        //game.render(/*..*/);

        window.display();
    }
    return 0;
}


Basically the same thing will work on any IDE, you just have a different GUI for specifying the libs you want to link, and the compiler and linker search directories, and other options.
Last edited on Jul 19, 2013 at 3:28am
Jul 18, 2013 at 9:06pm
GCC 4.7 TDM (SJLJ) or GCC 4.7 MinGW (DW2) - 32 bits SFML
Jul 18, 2013 at 9:17pm
32 bit SFML, and GCC 4.7 MinGW, is what I am using.

The regular MinGW doesn't support developing 64 bit applications, but there is MinGW 64.

http://mingw-w64.sourceforge.net/
Last edited on Jul 18, 2013 at 9:31pm
Jul 18, 2013 at 9:57pm
tryied borland, devcpp, ms vs 2010, .... and more but I use :
Code::Blocks EDIT :: MinGW compiler
why? for the love of free ware and I feel that I belong to that group of programmers.

Coding with Code::Blocks make me feel more relaxed.

for mini coding I use notepad++

as for graphics I started learning SFML
Last edited on Jul 18, 2013 at 9:57pm
Jul 18, 2013 at 10:24pm
Did you create a opengl project or empty?
Pages: 123