Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Glew trouble when trying to run modern OpenGL  (Read 6789 times)

0 Members and 1 Guest are viewing this topic.

SpectreNectar

  • Newbie
  • *
  • Posts: 39
    • View Profile
Glew trouble when trying to run modern OpenGL
« on: June 04, 2014, 04:59:46 pm »
Hello

I'm trying to get OpenGl 3.3 to work with SFML 2.1. I read in the tutorials that I need to include Glew myself, which would explain why I can't get stuff like this working (undefined errors):

GLuint IndexVBOID;
glGenBuffers(1, &IndexVBOID);

and

glBlendEquationSeparate(GL_FUNC_ADD, GL_FUNC_ADD);
glBlendFuncSeparate(GL_ONE, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ZERO);


-but can use glDrawArrays etc.

I understand that Glew must be included before SFML (right?), but when I try that I get tons of this:

C:\sfml\SFML-2.1\lib/libsfml-graphics-s-d.a(glew.c.o):glew.c:(.bss+0x2698): multiple definition of `__wglewWaitForSbcOML'
C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib(tmp/glew_static/Release/Win32/glew.obj):(.bss+0x25bc): first defined here


What am I completely misunderstanding? :)

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #1 on: June 04, 2014, 05:34:35 pm »
If you're using Modern OpenGL with glew you should have downloaded glew and extracted the contents to a directory e.g. C:/local/glew

Make sure you link your project with glew as well as SFML, are you doing this?

SpectreNectar

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #2 on: June 04, 2014, 05:41:35 pm »
I believe so.

Here's my Code::Blocks project file:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
        <FileVersion major="1" minor="6" />
        <Project>
                <Option title="SFML Witch" />
                <Option pch_mode="2" />
                <Option compiler="gcc" />
                <Build>
                        <Target title="Debug">
                                <Option output="bin/Debug/SFML Witch" prefix_auto="1" extension_auto="1" />
                                <Option object_output="obj/Debug/" />
                                <Option type="1" />
                                <Option compiler="gcc" />
                                <Option use_console_runner="0" />
                                <Option projectLinkerOptionsRelation="2" />
                                <Compiler>
                                        <Add option="-g" />
                                        <Add option="-D__WXDEBUG__" />
                                        <Add option="-DSFML_STATIC" />
                                        <Add option="-DGLEW_STATIC" />
                                        <Add directory="C:/sfml/SFML-2.1/include" />
                                        <Add directory="C:/wxWidgets/3.0.0/lib/gcc_dll/mswud" />
                                        <Add directory="C:/glm" />
                                        <Add directory="C:/Glew/1.10.0/include" />
                                </Compiler>
                                <ResourceCompiler>
                                        <Add directory="C:/wxWidgets/3.0.0/lib/gcc_dll/mswud" />
                                </ResourceCompiler>
                                <Linker>
                                        <Add library="C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib" />
                                        <Add library="sfml-graphics-s-d" />
                                        <Add library="sfml-window-s-d" />
                                        <Add library="sfml-system-s-d" />
                                        <Add library="sfml-audio-s-d" />
                                        <Add library="libwxmsw30ud.a" />
                                        <Add library="libwxmsw30ud_gl.a" />
                                        <Add library="libwxpngd.a" />
                                        <Add library="libwxjpegd.a" />
                                        <Add library="libwxtiffd.a" />
                                        <Add library="libwxzlibd.a" />
                                        <Add directory="C:/sfml/SFML-2.1/lib" />
                                        <Add directory="C:/wxWidgets/3.0.0/lib/gcc_dll" />
                                        <Add directory="C:/Program Files (x86)/CodeBlocks/MinGW/lib" />
                                </Linker>
                        </Target>
                        <Target title="Release">
                                <Option output="bin/Release/SFML Witch" prefix_auto="1" extension_auto="1" />
                                <Option object_output="obj/Release/" />
                                <Option type="0" />
                                <Option compiler="gcc" />
                                <Option projectLinkerOptionsRelation="2" />
                                <Compiler>
                                        <Add option="-O2" />
                                        <Add option="-DSFML_STATIC" />
                                        <Add option="-DGLEW_STATIC" />
                                        <Add directory="C:/sfml/SFML-2.1/include" />
                                        <Add directory="C:/wxWidgets/3.0.0/lib/gcc_dll/mswu" />
                                </Compiler>
                                <ResourceCompiler>
                                        <Add directory="C:/wxWidgets/3.0.0/lib/gcc_dll/mswu" />
                                </ResourceCompiler>
                                <Linker>
                                        <Add option="-s" />
                                        <Add library="sfml-graphics-s" />
                                        <Add library="sfml-window-s" />
                                        <Add library="sfml-system-s" />
                                        <Add library="sfml-audio-s" />
                                        <Add library="libwxmsw30u.a" />
                                        <Add library="libwxmsw30u_gl.a" />
                                        <Add library="libwxpng.a" />
                                        <Add library="libwxjpeg.a" />
                                        <Add library="libwxtiff.a" />
                                        <Add library="libwxzlib.a" />
                                        <Add directory="C:/sfml/SFML-2.1/lib" />
                                        <Add directory="C:/wxWidgets/3.0.0/lib/gcc_dll" />
                                </Linker>
                        </Target>
                </Build>
                <Compiler>
                        <Add option="-Wall" />
                        <Add option="-pipe" />
                        <Add option="-mthreads" />
                        <Add option="-D__GNUWIN32__" />
                        <Add option="-D__WXMSW__" />
                        <Add option="-DwxUSE_UNICODE" />
                        <Add directory="C:/wxWidgets/3.0.0/include" />
                </Compiler>
                <ResourceCompiler>
                        <Add directory="C:/wxWidgets/3.0.0/include" />
                </ResourceCompiler>
                <Linker>
                        <Add option="-mthreads" />
                        <Add library="libkernel32.a" />
                        <Add library="libuser32.a" />
                        <Add library="libgdi32.a" />
                        <Add library="libwinspool.a" />
                        <Add library="libcomdlg32.a" />
                        <Add library="libadvapi32.a" />
                        <Add library="libshell32.a" />
                        <Add library="libole32.a" />
                        <Add library="liboleaut32.a" />
                        <Add library="libuuid.a" />
                        <Add library="libcomctl32.a" />
                        <Add library="libwsock32.a" />
                        <Add library="libodbc32.a" />
                </Linker>
                <Unit filename="class/Core/Files/data.cpp" />
                <Unit filename="class/Core/Files/data.h" />
                <Unit filename="class/Core/Files/serializable.h" />
                <Unit filename="class/Core/Graphics/material.cpp" />
                <Unit filename="class/Core/Graphics/material.h" />
                <Unit filename="class/Core/Graphics/renderer.cpp" />
                <Unit filename="class/Core/Graphics/renderer.h" />
                <Unit filename="class/Core/Graphics/visuals.cpp" />
                <Unit filename="class/Core/Graphics/visuals.h" />
                <Unit filename="class/Core/cell.h" />
                <Unit filename="class/Core/collisions.cpp" />
                <Unit filename="class/Core/collisions.h" />
                <Unit filename="class/Core/content.cpp" />
                <Unit filename="class/Core/content.h" />
                <Unit filename="class/Core/game.cpp" />
                <Unit filename="class/Core/game.h" />
                <Unit filename="class/Core/prim.cpp" />
                <Unit filename="class/Core/prim.h" />
                <Unit filename="class/Core/world.cpp" />
                <Unit filename="class/Core/world.h" />
                <Unit filename="class/Editor/canvas.cpp" />
                <Unit filename="class/Editor/canvas.h" />
                <Unit filename="class/Editor/editor.cpp" />
                <Unit filename="class/Editor/editor.h" />
                <Unit filename="class/Editor/gamethread.cpp" />
                <Unit filename="class/Editor/gamethread.h" />
                <Unit filename="class/Editor/identifiers.h" />
                <Unit filename="class/Editor/sculptor.cpp" />
                <Unit filename="class/Editor/sculptor.h" />
                <Unit filename="class/Editor/selector.cpp" />
                <Unit filename="class/Editor/selector.h" />
                <Unit filename="class/Editor/wxSDL.cpp" />
                <Unit filename="class/Editor/wxSDL.h" />
                <Unit filename="class/Game/App.cpp" />
                <Unit filename="class/Game/App.h" />
                <Unit filename="class/Game/input.cpp" />
                <Unit filename="class/Game/input.h" />
                <Unit filename="class/Game/painter.cpp" />
                <Unit filename="class/Game/painter.h" />
                <Unit filename="class/Game/resman.h" />
                <Unit filename="class/defines.h" />
                <Unit filename="class/linkedList.h" />
                <Unit filename="class/utility.h" />
                <Unit filename="class/vector2d.h" />
                <Unit filename="class/vector3d.h" />
                <Unit filename="main.cpp" />
                <Unit filename="main.h" />
                <Unit filename="resource.rc">
                        <Option compilerVar="WINDRES" />
                </Unit>
                <Extensions>
                        <code_completion />
                        <envvars />
                        <debugger />
                        <lib_finder disable_auto="1" />
                </Extensions>
        </Project>
</CodeBlocks_project_file>
 


In comparison this project runs fine (but uses GLFW):

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
        <FileVersion major="1" minor="6" />
        <Project>
                <Option title="OpenGL Minimal" />
                <Option pch_mode="2" />
                <Option compiler="gcc" />
                <Build>
                        <Target title="Debug">
                                <Option output="bin/Debug/OpenGL Minimal" prefix_auto="1" extension_auto="1" />
                                <Option object_output="obj/Debug/" />
                                <Option type="1" />
                                <Option compiler="gcc" />
                                <Compiler>
                                        <Add option="-g" />
                                        <Add option="-DGLEW_STATIC" />
                                        <Add directory="C:/GLFW/include" />
                                        <Add directory="C:/glm" />
                                        <Add directory="C:/Glew/1.10.0/include" />
                                </Compiler>
                                <Linker>
                                        <Add library="C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib" />
                                        <Add library="libopengl32.a" />
                                        <Add library="C:\GLFW\lib-mingw\glfw3dll.a" />
                                        <Add library="C:\GLFW\lib-mingw\libglfw3.a" />
                                        <Add directory="C:/GLFW/lib-mingw" />
                                </Linker>
                        </Target>
                        <Target title="Release">
                                <Option output="bin/Release/OpenGL Minimal" prefix_auto="1" extension_auto="1" />
                                <Option object_output="obj/Release/" />
                                <Option type="1" />
                                <Option compiler="gcc" />
                                <Compiler>
                                        <Add option="-O2" />
                                        <Add directory="C:/GLFW/include" />
                                </Compiler>
                                <Linker>
                                        <Add option="-s" />
                                        <Add library="C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib" />
                                        <Add library="libopengl32.a" />
                                        <Add library="C:\GLFW\lib-mingw\glfw3dll.a" />
                                        <Add library="C:\GLFW\lib-mingw\libglfw3.a" />
                                        <Add directory="C:/GLFW/lib-mingw" />
                                </Linker>
                        </Target>
                </Build>
                <Compiler>
                        <Add option="-Wall" />
                        <Add option="-fexceptions" />
                </Compiler>
                <Unit filename="main.cpp" />
                <Unit filename="shader.cpp" />
                <Unit filename="shader.h" />
                <Unit filename="texture.cpp" />
                <Unit filename="texture.h" />
                <Extensions>
                        <code_completion />
                        <envvars />
                        <debugger />
                        <lib_finder disable_auto="1" />
                </Extensions>
        </Project>
</CodeBlocks_project_file>
 

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #3 on: June 04, 2014, 05:53:27 pm »
Are you currently building on debug or release with your project that is not working?

SpectreNectar

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #4 on: June 04, 2014, 05:55:32 pm »
I'm building on debug. I haven't set up release yet.

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #5 on: June 04, 2014, 06:04:21 pm »
Hm, could you post your code of say a Gist and link it here so I can see what you're writing?

SpectreNectar

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #6 on: June 04, 2014, 06:15:51 pm »
You mean like this?

openglinc.h: http://pastebin.com/AmF6cmeP
App.h: http://pastebin.com/wsX9gZXC
App.cpp: http://pastebin.com/xVsgJDsX


...openglinc.h is also included here:

[painter.h]
#ifndef PAINTER_H_INCLUDED
#define PAINTER_H_INCLUDED


#include <cstdio>
#include <string>

#include "../openglinc.h"

#include "../linkedList.h"
#include "../Core/game.h"
#include "../Core/Graphics/renderer.h"
#include "resman.h"
...


[input.h]
#ifndef CONTROL_H_INCLUDED
#define CONTROL_H_INCLUDED

#include <vector>
#include <math.h>            // fabs()
#include "../openglinc.h"
...


...App.h is also included here:

[wxSDL.h] (which doesn't use SDL)
#ifndef WXSDL_H_INCLUDED
#define WXSDL_H_INCLUDED

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////

#include <wx/wx.h>
#include "../Game/App.h"
...



[gamethread.h]
#ifndef GAMETHREAD_H_INCLUDED
#define GAMETHREAD_H_INCLUDED

#include <wx/wx.h>
#include "../Game/App.h"
#include "editor.h"

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #7 on: June 04, 2014, 06:19:46 pm »
If you're using ModernGL and GLM you should not be using a RenderWindow, the renderwindow is used with SFML graphics provided by the library among other things, all you need is a window.

Change your definition to

sf::Window window
to avoid multiple glew definitions
« Last Edit: June 04, 2014, 06:27:02 pm by Syntactic Fructose »

SpectreNectar

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #8 on: June 04, 2014, 06:26:40 pm »
Sure take your time, and thank you for helping

I use sf::Texture for loading png's inside painter.cpp and that relies on graphics.hpp.
I might be able to load textures without sfml but I would prefer to use it.

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #9 on: June 04, 2014, 06:27:59 pm »
Sure take your time, and thank you for helping

I use sf::Texture for loading png's inside painter.cpp and that relies on graphics.hpp.
I might be able to load textures without sfml but I would prefer to use it.

check my last post, edited it. This should work, I went into one of my own SFML projects and changed my sf::Window to sf::RenderWindow and received similar errors to yours.

SpectreNectar

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #10 on: June 04, 2014, 06:37:33 pm »
That didn't fix it I'm afraid.

I uploaded painter.h + painter.cpp
http://pastebin.com/ERGHjwU9
http://pastebin.com/DRKUeYfx


This is my build log:

-------------- Build: Debug in SFML Witch (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -g -D__WXDEBUG__ -DSFML_STATIC -DGLEW_STATIC -std=c++11 -fno-keep-inline-dllexport -IC:\wxWidgets\3.0.0\include -IC:\sfml\SFML-2.1\include -IC:\wxWidgets\3.0.0\lib\gcc_dll\mswud -IC:\glm -IC:\Glew\1.10.0\include -c E:\Magic\SFML\class\Game\App.cpp -o obj\Debug\class\Game\App.o
In file included from C:\glm/glm/gtc/matrix_transform.hpp:292:0,
                 from E:\Magic\SFML\class\Game\../openglinc.h:12,
                 from E:\Magic\SFML\class\Game\App.h:14,
                 from E:\Magic\SFML\class\Game\App.cpp:2:
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, P> glm::rotate(const glm::detail::tmat4x4<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/matrix_transform.inl:79:165: note: #pragma message: GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, P> glm::rotate_slow(const glm::detail::tmat4x4<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/matrix_transform.inl:120:170: note: #pragma message: GLM: rotate_slow function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::perspective(const valType&, const valType&, const valType&, const valType&)':
C:\glm/glm/gtc/matrix_transform.inl:253:170: note: #pragma message: GLM: perspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::perspectiveFov(const valType&, const valType&, const valType&, const valType&, const valType&)':
C:\glm/glm/gtc/matrix_transform.inl:285:173: note: #pragma message: GLM: perspectiveFov function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::infinitePerspective(T, T, T)':
C:\glm/glm/gtc/matrix_transform.inl:311:178: note: #pragma message: GLM: infinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::tweakedInfinitePerspective(T, T, T)':
C:\glm/glm/gtc/matrix_transform.inl:339:185: note: #pragma message: GLM: tweakedInfinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
In file included from C:\glm/glm/gtc/quaternion.hpp:401:0,
                 from E:\Magic\SFML\class\Game\../openglinc.h:13,
                 from E:\Magic\SFML\class\Game\App.h:14,
                 from E:\Magic\SFML\class\Game\App.cpp:2:
C:\glm/glm/gtc/quaternion.inl: In function 'glm::detail::tquat<T, P> glm::rotate(const glm::detail::tquat<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:626:165: note: #pragma message: GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::roll(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:653:151: note: #pragma message: GLM: roll function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::pitch(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:667:152: note: #pragma message: GLM: pitch function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::yaw(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:681:150: note: #pragma message: GLM: yaw function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::angle(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:811:152: note: #pragma message: GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'glm::detail::tquat<T, P> glm::angleAxis(const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:841:168: note: #pragma message: GLM: angleAxis function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -g -D__WXDEBUG__ -DSFML_STATIC -DGLEW_STATIC -std=c++11 -fno-keep-inline-dllexport -IC:\wxWidgets\3.0.0\include -IC:\sfml\SFML-2.1\include -IC:\wxWidgets\3.0.0\lib\gcc_dll\mswud -IC:\glm -IC:\Glew\1.10.0\include -c E:\Magic\SFML\class\Game\input.cpp -o obj\Debug\class\Game\input.o
In file included from C:\glm/glm/gtc/matrix_transform.hpp:292:0,
                 from E:\Magic\SFML\class\Game\../openglinc.h:12,
                 from E:\Magic\SFML\class\Game\input.h:6,
                 from E:\Magic\SFML\class\Game\input.cpp:1:
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, P> glm::rotate(const glm::detail::tmat4x4<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/matrix_transform.inl:79:165: note: #pragma message: GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, P> glm::rotate_slow(const glm::detail::tmat4x4<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/matrix_transform.inl:120:170: note: #pragma message: GLM: rotate_slow function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::perspective(const valType&, const valType&, const valType&, const valType&)':
C:\glm/glm/gtc/matrix_transform.inl:253:170: note: #pragma message: GLM: perspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::perspectiveFov(const valType&, const valType&, const valType&, const valType&, const valType&)':
C:\glm/glm/gtc/matrix_transform.inl:285:173: note: #pragma message: GLM: perspectiveFov function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::infinitePerspective(T, T, T)':
C:\glm/glm/gtc/matrix_transform.inl:311:178: note: #pragma message: GLM: infinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::tweakedInfinitePerspective(T, T, T)':
C:\glm/glm/gtc/matrix_transform.inl:339:185: note: #pragma message: GLM: tweakedInfinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
In file included from C:\glm/glm/gtc/quaternion.hpp:401:0,
                 from E:\Magic\SFML\class\Game\../openglinc.h:13,
                 from E:\Magic\SFML\class\Game\input.h:6,
                 from E:\Magic\SFML\class\Game\input.cpp:1:
C:\glm/glm/gtc/quaternion.inl: In function 'glm::detail::tquat<T, P> glm::rotate(const glm::detail::tquat<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:626:165: note: #pragma message: GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::roll(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:653:151: note: #pragma message: GLM: roll function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::pitch(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:667:152: note: #pragma message: GLM: pitch function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::yaw(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:681:150: note: #pragma message: GLM: yaw function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::angle(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:811:152: note: #pragma message: GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'glm::detail::tquat<T, P> glm::angleAxis(const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:841:168: note: #pragma message: GLM: angleAxis function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
E:\Magic\SFML\class\Game\input.cpp: In member function 'void LIB::Input::e_joystick_moved(LIB::Input::Button&, int, sf::Joystick::Axis, float)':
E:\Magic\SFML\class\Game\input.cpp:172:14: warning: unused variable 'neg' [-Wunused-variable]
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -g -D__WXDEBUG__ -DSFML_STATIC -DGLEW_STATIC -std=c++11 -fno-keep-inline-dllexport -IC:\wxWidgets\3.0.0\include -IC:\sfml\SFML-2.1\include -IC:\wxWidgets\3.0.0\lib\gcc_dll\mswud -IC:\glm -IC:\Glew\1.10.0\include -c E:\Magic\SFML\class\Game\painter.cpp -o obj\Debug\class\Game\painter.o
In file included from C:\glm/glm/gtc/matrix_transform.hpp:292:0,
                 from E:\Magic\SFML\class\Game\../openglinc.h:12,
                 from E:\Magic\SFML\class\Game\painter.h:8,
                 from E:\Magic\SFML\class\Game\painter.cpp:1:
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, P> glm::rotate(const glm::detail::tmat4x4<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/matrix_transform.inl:79:165: note: #pragma message: GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, P> glm::rotate_slow(const glm::detail::tmat4x4<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/matrix_transform.inl:120:170: note: #pragma message: GLM: rotate_slow function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::perspective(const valType&, const valType&, const valType&, const valType&)':
C:\glm/glm/gtc/matrix_transform.inl:253:170: note: #pragma message: GLM: perspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::perspectiveFov(const valType&, const valType&, const valType&, const valType&, const valType&)':
C:\glm/glm/gtc/matrix_transform.inl:285:173: note: #pragma message: GLM: perspectiveFov function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::infinitePerspective(T, T, T)':
C:\glm/glm/gtc/matrix_transform.inl:311:178: note: #pragma message: GLM: infinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::tweakedInfinitePerspective(T, T, T)':
C:\glm/glm/gtc/matrix_transform.inl:339:185: note: #pragma message: GLM: tweakedInfinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
In file included from C:\glm/glm/gtc/quaternion.hpp:401:0,
                 from E:\Magic\SFML\class\Game\../openglinc.h:13,
                 from E:\Magic\SFML\class\Game\painter.h:8,
                 from E:\Magic\SFML\class\Game\painter.cpp:1:
C:\glm/glm/gtc/quaternion.inl: In function 'glm::detail::tquat<T, P> glm::rotate(const glm::detail::tquat<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:626:165: note: #pragma message: GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::roll(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:653:151: note: #pragma message: GLM: roll function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::pitch(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:667:152: note: #pragma message: GLM: pitch function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::yaw(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:681:150: note: #pragma message: GLM: yaw function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::angle(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:811:152: note: #pragma message: GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'glm::detail::tquat<T, P> glm::angleAxis(const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:841:168: note: #pragma message: GLM: angleAxis function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
E:\Magic\SFML\class\Game\painter.cpp: In member function 'void LIB::Painter::paint(double, double, int, int, int, int)':
E:\Magic\SFML\class\Game\painter.cpp:110:23: warning: variable 'position' set but not used [-Wunused-but-set-variable]
E:\Magic\SFML\class\Game\painter.cpp:112:23: warning: variable 'plypos' set but not used [-Wunused-but-set-variable]
E:\Magic\SFML\class\Game\painter.cpp:113:19: warning: unused variable 'speed' [-Wunused-variable]
E:\Magic\SFML\class\Game\painter.cpp:116:19: warning: unused variable 'camdir_ang' [-Wunused-variable]
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DwxUSE_UNICODE -g -D__WXDEBUG__ -DSFML_STATIC -DGLEW_STATIC -std=c++11 -fno-keep-inline-dllexport -IC:\wxWidgets\3.0.0\include -IC:\sfml\SFML-2.1\include -IC:\wxWidgets\3.0.0\lib\gcc_dll\mswud -IC:\glm -IC:\Glew\1.10.0\include -c E:\Magic\SFML\main.cpp -o obj\Debug\main.o
In file included from C:\glm/glm/gtc/matrix_transform.hpp:292:0,
                 from E:\Magic\SFML\class/Editor/../Game/../openglinc.h:12,
                 from E:\Magic\SFML\class/Editor/../Game/App.h:14,
                 from E:\Magic\SFML\class/Editor/gamethread.h:5,
                 from E:\Magic\SFML\class/Editor/editor.h:21,
                 from E:\Magic\SFML\main.cpp:19:
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, P> glm::rotate(const glm::detail::tmat4x4<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/matrix_transform.inl:79:165: note: #pragma message: GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, P> glm::rotate_slow(const glm::detail::tmat4x4<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/matrix_transform.inl:120:170: note: #pragma message: GLM: rotate_slow function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::perspective(const valType&, const valType&, const valType&, const valType&)':
C:\glm/glm/gtc/matrix_transform.inl:253:170: note: #pragma message: GLM: perspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::perspectiveFov(const valType&, const valType&, const valType&, const valType&, const valType&)':
C:\glm/glm/gtc/matrix_transform.inl:285:173: note: #pragma message: GLM: perspectiveFov function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::infinitePerspective(T, T, T)':
C:\glm/glm/gtc/matrix_transform.inl:311:178: note: #pragma message: GLM: infinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/matrix_transform.inl: In function 'glm::detail::tmat4x4<T, (glm::precision)0u> glm::tweakedInfinitePerspective(T, T, T)':
C:\glm/glm/gtc/matrix_transform.inl:339:185: note: #pragma message: GLM: tweakedInfinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
In file included from C:\glm/glm/gtc/quaternion.hpp:401:0,
                 from E:\Magic\SFML\class/Editor/../Game/../openglinc.h:13,
                 from E:\Magic\SFML\class/Editor/../Game/App.h:14,
                 from E:\Magic\SFML\class/Editor/gamethread.h:5,
                 from E:\Magic\SFML\class/Editor/editor.h:21,
                 from E:\Magic\SFML\main.cpp:19:
C:\glm/glm/gtc/quaternion.inl: In function 'glm::detail::tquat<T, P> glm::rotate(const glm::detail::tquat<T, P>&, const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:626:165: note: #pragma message: GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::roll(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:653:151: note: #pragma message: GLM: roll function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::pitch(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:667:152: note: #pragma message: GLM: pitch function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::yaw(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:681:150: note: #pragma message: GLM: yaw function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'T glm::angle(const glm::detail::tquat<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:811:152: note: #pragma message: GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
C:\glm/glm/gtc/quaternion.inl: In function 'glm::detail::tquat<T, P> glm::angleAxis(const T&, const glm::detail::tvec3<T, P>&)':
C:\glm/glm/gtc/quaternion.inl:841:168: note: #pragma message: GLM: angleAxis function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.
mingw32-g++.exe -LC:\sfml\SFML-2.1\lib -LC:\wxWidgets\3.0.0\lib\gcc_dll -L"C:\Program Files (x86)\CodeBlocks\MinGW\lib" -o "bin\Debug\SFML Witch.exe" obj\Debug\class\Core\collisions.o obj\Debug\class\Core\content.o obj\Debug\class\Core\Files\data.o obj\Debug\class\Core\game.o obj\Debug\class\Core\Graphics\material.o obj\Debug\class\Core\Graphics\renderer.o obj\Debug\class\Core\Graphics\visuals.o obj\Debug\class\Core\prim.o obj\Debug\class\Core\world.o obj\Debug\class\Editor\canvas.o obj\Debug\class\Editor\editor.o obj\Debug\class\Editor\gamethread.o obj\Debug\class\Editor\sculptor.o obj\Debug\class\Editor\selector.o obj\Debug\class\Editor\wxSDL.o obj\Debug\class\Game\App.o obj\Debug\class\Game\input.o obj\Debug\class\Game\painter.o obj\Debug\main.o  obj\Debug\resource.res -mthreads  C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib -lopengl32 -lsfml-graphics-s-d -lsfml-window-s-d -lsfml-system-s-d -lsfml-audio-s-d -lwxmsw30ud -lwxmsw30ud_gl -lwxpngd -lwxjpegd -lwxtiffd -lwxzlibd -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32
C:\sfml\SFML-2.1\lib/libsfml-graphics-s-d.a(glew.c.o):glew.c:(.bss+0xd78): multiple definition of `__glewWindowPos2dARB'
C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib(tmp/glew_static/Release/Win32/glew.obj):(.bss+0xeec): first defined here
C:\sfml\SFML-2.1\lib/libsfml-graphics-s-d.a(glew.c.o):glew.c:(.bss+0xd7c): multiple definition of `__glewWindowPos2dvARB'
C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib(tmp/glew_static/Release/Win32/glew.obj):(.bss+0xef0): first defined here
C:\sfml\SFML-2.1\lib/libsfml-graphics-s-d.a(glew.c.o):glew.c:(.bss+0xd80): multiple definition of `__glewWindowPos2fARB'
C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib(tmp/glew_static/Release/Win32/glew.obj):(.bss+0xef4): first defined here
C:\sfml\SFML-2.1\lib/libsfml-graphics-s-d.a(glew.c.o):glew.c:(.bss+0xd84): multiple definition of `__glewWindowPos2fvARB'
C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib(tmp/glew_static/Release/Win32/glew.obj):(.bss+0xef8): first defined here
C:\sfml\SFML-2.1\lib/libsfml-graphics-s-d.a(glew.c.o):glew.c:(.bss+0xd88): multiple definition of `__glewWindowPos2iARB'
C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib(tmp/glew_static/Release/Win32/glew.obj):(.bss+0xefc): first defined here
C:\sfml\SFML-2.1\lib/libsfml-graphics-s-d.a(glew.c.o):glew.c:(.bss+0xd8c): multiple definition of `__glewWindowPos2ivARB'
C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib(tmp/glew_static/Release/Win32/glew.obj):(.bss+0xf00): first defined here
C:\sfml\SFML-2.1\lib/libsfml-graphics-s-d.a(glew.c.o):glew.c:(.bss+0xd90): multiple definition of `__glewWindowPos2sARB'
C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib(tmp/glew_static/Release/Win32/glew.obj):(.bss+0xf04): first defined here
C:\sfml\SFML-2.1\lib/libsfml-graphics-s-d.a(glew.c.o):glew.c:(.bss+0xd94): multiple definition of `__glewWindowPos2svARB'
C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib(tmp/glew_static/Release/Win32/glew.obj):(.bss+0xf08): first defined here
C:\sfml\SFML-2.1\lib/libsfml-graphics-s-d.a(glew.c.o):glew.c:(.bss+0xd98): multiple definition of `__glewWindowPos3dARB'
C:\Glew\1.10.0\lib\Release\Win32\glew32s.lib(tmp/glew_static/Release/Win32/glew.obj):(.bss+0xf0c): first defined here
etc etc etc

Syntactic Fructose

  • Jr. Member
  • **
  • Posts: 80
  • Overflowing stacks and eating snacks
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #11 on: June 04, 2014, 06:43:51 pm »
I can't say I know what the issue is then, I don't have any experience with code::blocks and the code base is quite large so I don't have any starting point to look at. It's obvious the SFML Glew is conflicting with your provided Glew however, that's what I can deduce from the error code. I'll maybe check up on this later tonight if no one has answered after I get off work.

SpectreNectar

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #12 on: June 04, 2014, 06:50:42 pm »
Ok, I'll wait and see then.

And for anyone familiar with C::B I also tried removing Painter entirely and got a "it seems your project has not been build yet" message. I tried rebuilding and got no errors, but it came back up.

kingcools

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Glew trouble when trying to run modern OpenGL
« Reply #13 on: June 04, 2014, 10:57:52 pm »
Quote
multiple definition of `__glewWindowPos2dARB'

this appears usually when you define a function in a header file and then include it in two other files, then the functions are loaded in different files and once everything is compiled and the linker builds your exe it realizes you have identical functionnames and it throws an error.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: Glew trouble when trying to run modern OpenGL
« Reply #14 on: June 05, 2014, 12:36:49 am »
I prefer the simpler diagnosis: You are following the instructions for building with post-2.1 SFML whereas you are using 2.1 SFML.

Linking was only changed after 2.1, so please adjust your project settings appropriately. 2.1 didn't require you to link in dependencies if you static linked SFML to your project.
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).

 

anything