Eclipse, code-blocks, or Visual Studio

Pages: 123
Empty.
and how do i create the main.cpp because when i create a class it has a .h
file->new file, choose c++ source file.
i have included all of the files in the linker settings but i get an error in the #include <GL/glew.h>
You should have a folder called, C:/usr/include/GL, and in it, you should have files called glew.h, glxew.h, and wglew.h.

In project->build options->search directories->compiler, you should have added c:/usr/include
Last edited on
i have an error with

sf::ContexSettings(24, 8, 4, 4, 0));

'ContexSettings' is not a member of 'sf'|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|
Last edited on
It should be sf::ContextSettings
Last edited on
so many errors!

ld.exe||cannot find -lglew32s|
ld.exe||cannot find -lsfm-graphics|
ld.exe||cannot find -lsfml-window|
ld.exe||cannot find -lsfml-system|

urgggggg
Last edited on
I personally use code::blocks with the mingw that comes with it
yeah i just wish setting up opengl would be easier for codeblocks
Where ever you put those files that the linker cannot find, add that directory to project->build options->search directories->linker.
Last edited on
I use Qt Creator for all my projects under Linux and when I use Windows.
still getting issues i can't find the library and i have done what you said

is there a video tutorial? or some type of documentation?
Last edited on
is setting up openGL for codeblocks any harder than sfml?
well im trying to do 3d graphics in codeblocks

but im trying to set it up
Last edited on
Can you post the directory that glew32s.lib is in, and the path you specified in linker search directories. For example, I have glew32s.lib in c:\usr\lib, and I have c:\usr\lib added to the linker search directory.
Last edited on
i fixed the libary issues but i got an error stating

The procedure entry point _gxx_personlity_v0 could not be located in the dynamic link libary libstdc++-6.dll


this is my code

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
40
41
42
#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 WIDTH = 1280;
int HEIGHT = 720;

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 quit = 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;
}

Last edited on
closed account (EwCjE3v7)
Code::Blocks..The best
Maybe you are compiling with a different version of GCC than the SFML version you downloaded?

In the first link, in the red box, it tells you how to figure out which version of GCC you're using. Go into C:/MinGW/bin and find a file called either libgcc_s_sjlj-1.dll, or libgcc_s_dw2-1.dll, which will indicate whether you have the SJLJ or DW2 version of GCC. Then go back and download the correct version of SFML and get rid of the wrong version.

http://www.sfml-dev.org/tutorials/2.0/start-cb.php
http://www.sfml-dev.org/download/sfml/2.0/

Last edited on
closed account (NUj6URfi)
Dev-C++ obviously.
Pages: 123