Skip to main content
GameDev.net gamedev.net
🔒 Locked

[GLEW] Linker errors with OpenGL and GLEW

Started by adam_o Mar 7, 2009 at 4:14 PM 9 replies 6.3k views
Original Post
adam_o
adam_o
Hello all, I've been working on porting a project of mine from Mac OS X to Windows, using Xcode on Mac and Code::Blocks on Windows. The code runs fine on Xcode, but not on Code::Blocks - I'm getting some unusual linker errors for OpenGL functions (I don't know if this is true of all of them, or just some). I've put one of the files in question on pastebin here and the Code::Blocks "Build messages" tab here. The only thing that I can figure is that there's something wrong with GLEW, but I don't know what that could be. What do these linker errors mean, and how do I fix them? All help is appreciated and thanks in advance! adam_0
_______________________My computer stats:Xcode 3.1.2Mac OS 10.5.8---Visual C++ 2008 Express EditionWindows XP---NetBeansUbuntu 9.04---Help needed here!
adam_o
adam_o
Here's the files / output in source tags for convenience:

#ifdef WIN32#include <gl/gl.h>#define _USE_MATH_DEFINES#include <cmath>#else#include <OpenGL/gl.h>#endif#include <SDL/SDL.h>#include "Apollo.h"#include "Graphics.h"#include "SpriteSheet.h"#include "TextRenderer.h"#include <map>#include "Starfield.h"#include "Graphics.h"#include "Logging.h"#include "Utilities/Matrix2x3.h"#include "Shaders.h"#define DEG2RAD(x) ((x / 180.0f) * M_PI)#define RAD2DEG(x) ((x / M_PI) * 180.0f)const static float circlePoints[] = {   0.000, 1.000,   0.098, 0.995,   0.195, 0.981,   0.290, 0.957,   0.383, 0.924,   0.471, 0.882,   0.556, 0.831,   0.634, 0.773,   0.707, 0.707,   0.773, 0.634,   0.831, 0.556,   0.882, 0.471,   0.924, 0.383,   0.957, 0.290,   0.981, 0.195,   0.995, 0.098,   1.000, -0.000,   0.995, -0.098,   0.981, -0.195,   0.957, -0.290,   0.924, -0.383,   0.882, -0.471,   0.831, -0.556,   0.773, -0.634,   0.707, -0.707,   0.634, -0.773,   0.556, -0.831,   0.471, -0.882,   0.383, -0.924,   0.290, -0.957,   0.195, -0.981,   0.098, -0.995,   -0.000, -1.000,   -0.098, -0.995,   -0.195, -0.981,   -0.290, -0.957,   -0.383, -0.924,   -0.471, -0.882,   -0.556, -0.831,   -0.634, -0.773,   -0.707, -0.707,   -0.773, -0.634,   -0.831, -0.556,   -0.882, -0.471,   -0.924, -0.383,   -0.957, -0.290,   -0.981, -0.195,   -0.995, -0.098,   -1.000, 0.000,   -0.995, 0.098,   -0.981, 0.195,   -0.957, 0.290,   -0.924, 0.383,   -0.882, 0.471,   -0.831, 0.556,   -0.773, 0.634,   -0.707, 0.707,   -0.634, 0.773,   -0.556, 0.831,   -0.471, 0.882,   -0.383, 0.924,   -0.290, 0.957,   -0.195, 0.981,   -0.098, 0.995,   -0.000, 1.000};typedef std::map<std::string, Graphics::SpriteSheet*> SheetMap;static SheetMap spriteSheets;namespace Graphics{using namespace Shaders;int scw, sch;/* Other files can use:  namespace Matrices {  void SetProjectionMatrix ( const matrix2x3& m ); void SetViewMatrix ( const matrix2x3& m ); void SetModelMatrix ( const matrix2x3& m );  } */namespace Matrices{static matrix2x3 projectionMatrix;static matrix2x3 viewMatrix;static matrix2x3 modelMatrix;static matrix2x3 mvpMatrix;static void LoadMatrix ( const matrix2x3& m ){	GLfloat array[16];	m.FillOpenGLMatrix(array);	glLoadMatrixf(array);}void SetProjectionMatrix ( const matrix2x3& m ){	projectionMatrix = m;}void SetViewMatrix ( const matrix2x3& m ){	viewMatrix = m;}// the state is only guaranteed after a SetModelMatrix callvoid SetModelMatrix ( const matrix2x3& m ){	modelMatrix = m;	mvpMatrix = modelMatrix * viewMatrix * projectionMatrix;	LoadMatrix(mvpMatrix);}const matrix2x3& CurrentMatrix (){	return mvpMatrix;}}void Init ( int w, int h, bool fullscreen ){	SDL_InitSubSystem ( SDL_INIT_VIDEO );	SDL_GL_SetAttribute ( SDL_GL_RED_SIZE, 8 );	SDL_GL_SetAttribute ( SDL_GL_BLUE_SIZE, 8 );	SDL_GL_SetAttribute ( SDL_GL_GREEN_SIZE, 8 );	SDL_GL_SetAttribute ( SDL_GL_ALPHA_SIZE, 0 );	SDL_GL_SetAttribute ( SDL_GL_DOUBLEBUFFER, 1 );	SDL_GL_SetAttribute ( SDL_GL_DEPTH_SIZE, 0 );	SDL_GL_SetAttribute ( SDL_GL_MULTISAMPLESAMPLES, 4 );	SDL_GL_SetAttribute ( SDL_GL_MULTISAMPLEBUFFERS, 1 );	SDL_GL_SetAttribute ( SDL_GL_SWAP_CONTROL, 1 );	Uint32 flags = SDL_OPENGL;	if (fullscreen)		flags |= SDL_FULLSCREEN;	if (!SDL_SetVideoMode(w, h, 0, flags))	{		SDL_GL_SetAttribute ( SDL_GL_MULTISAMPLESAMPLES, 0 );		SDL_GL_SetAttribute ( SDL_GL_MULTISAMPLEBUFFERS, 0 );		LOG("Graphics", LOG_WARNING, "Card does not support FSAA!");		if (!SDL_SetVideoMode(w, h, 0, flags))		{		    LOG("Graphics", LOG_WARNING, "Card does not support normal video options!");			SDL_GL_SetAttribute ( SDL_GL_RED_SIZE, 5 );			SDL_GL_SetAttribute ( SDL_GL_GREEN_SIZE, 5 );			SDL_GL_SetAttribute ( SDL_GL_BLUE_SIZE, 5 );			if (!SDL_SetVideoMode(w, h, 0, flags))			{                LOG("Graphics", LOG_ERROR, "Bad graphics driver.");				exit(1);			}		}	}		scw = w;	sch = h;		glClear ( GL_COLOR_BUFFER_BIT );		glEnable ( GL_BLEND );	glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );		glEnable ( GL_LINE_SMOOTH );	glEnable ( GL_POINT_SMOOTH );		glHint ( GL_LINE_SMOOTH_HINT, GL_NICEST );	glHint ( GL_POINT_SMOOTH_HINT, GL_NICEST );#ifdef __MACH__    glHint ( GL_TRANSFORM_HINT_APPLE, GL_FASTEST );#endif		glEnableClientState ( GL_VERTEX_ARRAY );}static bool texturingEnabled = false;static void EnableTexturing (){	if (!texturingEnabled)	{		glEnableClientState ( GL_TEXTURE_COORD_ARRAY );		texturingEnabled = true;	}}static void DisableTexturing (){	if (texturingEnabled)	{		glDisableClientState ( GL_TEXTURE_COORD_ARRAY );		texturingEnabled = false;	}}static bool blendingEnabled = true;static void EnableBlending (){	if (!blendingEnabled)	{		glEnable(GL_BLEND);		blendingEnabled = true;	}}static void DisableBlending (){	if (blendingEnabled)	{		glDisable(GL_BLEND);		blendingEnabled = false;	}}static void SetColour ( const colour& col ){	if (sizeof(col) == sizeof(float) * 4)	{		glColor4fv((const GLfloat*)&col);	}	else	{		glColor4f(col.red(), col.green(), col.blue(), col.alpha());	}}static void ClearColour (){	const uint32_t white = 0xFFFFFFFF;	glColor4ubv((const GLubyte*)&white);}vec2 SpriteDimensions ( const std::string& sheetname ){	SpriteSheet* sheet;	SheetMap::iterator iter = spriteSheets.find(sheetname);	if (iter == spriteSheets.end())	{		// load it		sheet = new SpriteSheet(sheetname);		spriteSheets[sheetname] = sheet;	}	else	{		sheet = iter->second;	}	assert(sheet);	return vec2(sheet->TileSizeX(), sheet->TileSizeY());}void DrawSprite ( const std::string& sheetname, int sheet_x, int sheet_y, vec2 location, vec2 size, float rotation ){	SetShader("Sprite");	EnableTexturing();	EnableBlending();	ClearColour();	SpriteSheet* sheet;	SheetMap::iterator iter = spriteSheets.find(sheetname);	if (iter == spriteSheets.end())	{		// load it		sheet = new SpriteSheet(sheetname);		spriteSheets[sheetname] = sheet;	}	else	{		sheet = iter->second;	}	Matrices::SetViewMatrix(matrix2x3::Translate(location));	Matrices::SetModelMatrix(matrix2x3::Identity());	if (sheet->IsRotational())	{		assert(sheet_x == 0);		assert(sheet_y == 0);		sheet->DrawRotation(size, rotation);	}	else	{		glRotatef(RAD2DEG(rotation), 0.0f, 0.0f, 1.0f);		sheet->Draw(sheet_x, sheet_y, size);	}}void DrawTextSDL ( const std::string& text, const std::string& font, vec2 location, float height, colour col, float rotation ){	SetShader("Sprite");	EnableTexturing();	EnableBlending();	SetColour(col);	GLuint texID = TextRenderer::TextObject(font, text);	Matrices::SetViewMatrix(matrix2x3::Translate(location));	Matrices::SetModelMatrix(matrix2x3::Rotation(rotation));	glBindTexture(GL_TEXTURE_RECTANGLE_ARB, texID);	vec2 dims = TextRenderer::TextDimensions(font, text);	vec2 halfSize = (dims * (height / dims.Y())) * 0.5f;	GLfloat textureArray[] = { 0.0f, 0.0f, dims.X(), 0.0f, dims.X(), dims.Y(), 0.0f, dims.Y() };	GLfloat vertexArray[] = { -halfSize.X(), halfSize.Y(), halfSize.X(), halfSize.Y(),	                          halfSize.X(), -halfSize.Y(), -halfSize.X(), -halfSize.Y() };	glVertexPointer(2, GL_FLOAT, 0, vertexArray);	glTexCoordPointer(2, GL_FLOAT, 0, textureArray);	glDrawArrays(GL_QUADS, 0, 4);}void DrawLine ( vec2 coordinate1, vec2 coordinate2, float width, colour col ){	SetShader("Primitive");	DisableTexturing();	if (col.alpha() < 1.0f)	{		EnableBlending();	}	else	{		DisableBlending();	}	glLineWidth(width);	Matrices::SetViewMatrix(matrix2x3::Identity());	Matrices::SetModelMatrix(matrix2x3::Identity());	SetColour(col);	float vertices[4] = { coordinate1.X(), coordinate1.Y(),	                      coordinate2.X(), coordinate2.Y() };	glVertexPointer ( 2, GL_FLOAT, 0, vertices );	glDrawArrays ( GL_LINES, 0, 2 );}void DrawCircle ( vec2 centre, float radius, float width, colour col ){	SetShader("Primitive");	DisableTexturing();	if (col.alpha() < 1.0f)	{		EnableBlending();	}	else	{		DisableBlending();	}	glLineWidth(width);	Matrices::SetViewMatrix(matrix2x3::Translate(centre));	Matrices::SetModelMatrix(matrix2x3::Scale(radius));	SetColour ( col );	glVertexPointer(2, GL_FLOAT, 0, circlePoints);	glDrawArrays(GL_LINE_LOOP, 0, sizeof(circlePoints) / (2 * sizeof(float)));}void DrawParticles ( const vec2* locations, unsigned int count, colour col ){	SetShader("Primitive");	DisableTexturing();	if (col.alpha() < 1.0f)	{		EnableBlending();	}	else	{		DisableBlending();	}	Matrices::SetViewMatrix(matrix2x3::Identity());	Matrices::SetModelMatrix(matrix2x3::Identity());	glVertexPointer ( 2, GL_FLOAT, 0, locations );	SetColour(col);	glDrawArrays ( GL_POINTS, 0, count );}static Starfield* sfld = NULL;void DrawStarfield ( float depth ){	if (!sfld)	{		sfld = new Starfield;	}	EnableTexturing();	DisableBlending();	ClearColour();	Matrices::SetViewMatrix(matrix2x3::Identity());	Matrices::SetModelMatrix(matrix2x3::Identity());	sfld->Draw(depth, vec2(0.0f, 0.0f));}static vec2 cameraCorner1;static vec2 cameraCorner2;static float cameraRotation;float AspectRatio (){	return float(scw) / float(sch);}vec2 MapPoint ( vec2 windowCoords ){	matrix2x3 viewProjection ( Matrices::viewMatrix * Matrices::projectionMatrix );	matrix2x3 vpi = viewProjection.Inverse();	vec2 normalisedCoords = vpi * windowCoords;	normalisedCoords += vec2(1.0f, 1.0f);	normalisedCoords *= 0.5f;	return vec2(normalisedCoords.X() * scw, normalisedCoords.Y() * sch);}bool IsCulled ( vec2 location, float radius ){	if ((location.X() + radius) < cameraCorner1.X())		return true;	if ((location.X() - radius) > cameraCorner2.X())		return true;	if ((location.Y() + radius) < cameraCorner1.Y())		return true;	if ((location.Y() - radius) > cameraCorner2.Y())		return true;	return false;}void SetCamera ( vec2 corner1, vec2 corner2, float rotation ){	matrix2x3 projection ( matrix2x3::Ortho(corner1.X(), corner2.X(), corner1.Y(), corner2.Y()) );	if (fabs(rotation) > 0.00004f)		projection *= matrix2x3::Rotation(rotation);	Matrices::SetProjectionMatrix(projection);	cameraCorner1 = corner1;	cameraCorner2 = corner2;}void BeginFrame (){	glClear(GL_COLOR_BUFFER_BIT);	Matrices::SetViewMatrix(matrix2x3::Identity());	Matrices::SetModelMatrix(matrix2x3::Identity());}void EndFrame (){#ifdef __MACH__    glSwapAPPLE();#else	SDL_GL_SwapBuffers();#endif	TextRenderer::Prune();}}

||Warning: .drectve `/manifestdependency:"type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'" /DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZdlPvS_':|C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\stl_construct.h:(.text+0x1f)||undefined reference to `_glLoadMatrixf@4'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics4InitEiib':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|195|undefined reference to `_glClear@4'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|197|undefined reference to `_glEnable@4'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|198|undefined reference to `_glBlendFunc@8'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|200|undefined reference to `_glEnable@4'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|201|undefined reference to `_glEnable@4'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|203|undefined reference to `_glHint@8'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|204|undefined reference to `_glHint@8'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|209|undefined reference to `_glEnableClientState@4'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics15EnableTexturingEv':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|218|undefined reference to `_glEnableClientState@4'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics16DisableTexturingEv':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|227|undefined reference to `_glDisableClientState@4'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics14EnableBlendingEv':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|238|undefined reference to `_glEnable@4'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics15DisableBlendingEv':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|247|undefined reference to `_glDisable@4'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics9SetColourERK6colour':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|256|undefined reference to `_glColor4fv@4'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics11ClearColourEv':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|267|undefined reference to `_glColor4ubv@4'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics10DrawSpriteERKSsii4vec2S2_f':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|316|undefined reference to `_glRotatef@16'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics11DrawTextSDLERKSsS1_4vec2f6colourf':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|330|undefined reference to `_glBindTexture@8'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|336|undefined reference to `_glVertexPointer@16'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|337|undefined reference to `_glTexCoordPointer@16'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|338|undefined reference to `_glDrawArrays@12'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics8DrawLineE4vec2S0_f6colour':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|353|undefined reference to `_glLineWidth@4'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|359|undefined reference to `_glVertexPointer@16'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|360|undefined reference to `_glDrawArrays@12'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics10DrawCircleE4vec2ff6colour':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|375|undefined reference to `_glLineWidth@4'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|379|undefined reference to `_glVertexPointer@16'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|380|undefined reference to `_glDrawArrays@12'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics13DrawParticlesEPK4vec2j6colour':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|397|undefined reference to `_glVertexPointer@16'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|399|undefined reference to `_glDrawArrays@12'|obj\Debug\Engine\Graphics\Graphics.o||In function `_ZN8Graphics10BeginFrameEv':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Graphics.cpp|462|undefined reference to `_glClear@4'|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSsPN8Graphics7Shaders6ShaderEEEEC2ERKSA_':|C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\allocator.h:(.text+0xb)||undefined reference to `__imp____glewGetProgramiv'|C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\allocator.h:(.text+0x35)||undefined reference to `__imp____glewGetProgramInfoLog'|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN8Graphics7Shaders14PrintLogShaderEj':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|39|undefined reference to `__imp____glewGetShaderiv'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|44|undefined reference to `__imp____glewGetShaderInfoLog'|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSsPN8Graphics7Shaders6ShaderEEEEC2ERKSA_':|)]+0x28)||undefined reference to `__imp____glewCreateShader'|)]+0x3e)||undefined reference to `__imp____glewShaderSource'|)]+0x69)||undefined reference to `__imp____glewCompileShader'|)]+0xa3)||undefined reference to `__imp____glewCreateShader'|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN8Graphics7Shaders14PrintLogShaderEj':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|39|undefined reference to `__imp____glewShaderSource'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|44|undefined reference to `__imp____glewCompileShader'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|45|undefined reference to `__imp____glewCreateProgram'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|47|undefined reference to `__imp____glewAttachShader'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|47|undefined reference to `__imp____glewAttachShader'|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN8Graphics7Shaders9AddShaderERKSsS2_S2_':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|103|undefined reference to `__imp____glewLinkProgram'|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSsPN8Graphics7Shaders6ShaderEEEEC2ERKSA_':|C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\allocator.h:(.text$_ZN8Graphics7Shaders6Shader4BindEv[Graphics::Shaders::Shader::Bind()]+0x21)||undefined reference to `__imp____glewUseProgram'|obj\Debug\Engine\Graphics\SpriteSheet.o||In function `_ZN8Graphics11SpriteSheet12MakeResidentEv':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\SpriteSheet.cpp|19|undefined reference to `_glGenTextures@8'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\SpriteSheet.cpp|20|undefined reference to `_glBindTexture@8'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\SpriteSheet.cpp|23|undefined reference to `_glTexImage2D@36'|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\SpriteSheet.cpp|29|undefined reference to `_glTexImage2D@36'|obj\Debug\Engine\Graphics\SpriteSheet.o||In function `_ZN8Graphics11SpriteSheetD2Ev':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\SpriteSheet.cpp|106|undefined reference to `_glDeleteTextures@8'|obj\Debug\Engine\Graphics\SpriteSheet.o||In function `_ZN8Graphics11SpriteSheetD1Ev':|~Full path removed~My Documents\CodeBlock\xsera\Engine\Graphics\SpriteSheet.cpp|106|undefined reference to `_glDeleteTextures@8'|||More errors follow but not being shown.|||Edit the max errors limit in compiler options...|||=== Build finished: 50 errors, 1 warnings ===|
_______________________My computer stats:Xcode 3.1.2Mac OS 10.5.8---Visual C++ 2008 Express EditionWindows XP---NetBeansUbuntu 9.04---Help needed here!
mobeen
mobeen
The output suggests that you are not linking the correct libraries make sure u do so?

I am not sure how u do it in codeblocks however, in MSVisualStudio .Net, u can either add the required libs to the project settings -> linker -> input -> additional libraries or add a pragma directive as follows
#pragma comment(lib,"opengl32.lib")#pragma comment(lib,"glew32.lib")

See if this helps,
Mobeen
Proud to be a PAKISTANI.
adam_o
adam_o
That's helped a little bit - no more OpenGL errors. I'm still getting more stuff from GLEW though:

||Warning: .drectve `/manifestdependency:"type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'" /DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSsPN8Graphics7Shaders6ShaderEEEEC2ERKSA_':|C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\allocator.h:(.text+0xb)||undefined reference to `__imp____glewGetProgramiv'|C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\allocator.h:(.text+0x35)||undefined reference to `__imp____glewGetProgramInfoLog'|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN8Graphics7Shaders14PrintLogShaderEj':|~path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|39|undefined reference to `__imp____glewGetShaderiv'|~path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|44|undefined reference to `__imp____glewGetShaderInfoLog'|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSsPN8Graphics7Shaders6ShaderEEEEC2ERKSA_':|)]+0x28)||undefined reference to `__imp____glewCreateShader'|)]+0x3e)||undefined reference to `__imp____glewShaderSource'|)]+0x69)||undefined reference to `__imp____glewCompileShader'|)]+0xa3)||undefined reference to `__imp____glewCreateShader'|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN8Graphics7Shaders14PrintLogShaderEj':|~path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|39|undefined reference to `__imp____glewShaderSource'|~path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|44|undefined reference to `__imp____glewCompileShader'|~path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|45|undefined reference to `__imp____glewCreateProgram'|~path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|47|undefined reference to `__imp____glewAttachShader'|~path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|47|undefined reference to `__imp____glewAttachShader'|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN8Graphics7Shaders9AddShaderERKSsS2_S2_':|~path removed~My Documents\CodeBlock\xsera\Engine\Graphics\Shaders.cpp|103|undefined reference to `__imp____glewLinkProgram'|obj\Debug\Engine\Graphics\Shaders.o||In function `_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKSsPN8Graphics7Shaders6ShaderEEEEC2ERKSA_':|C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\bits\allocator.h:(.text$_ZN8Graphics7Shaders6Shader4BindEv[Graphics::Shaders::Shader::Bind()]+0x21)||undefined reference to `__imp____glewUseProgram'|obj\Debug\Engine\Net\Client.o||In function `_ZN3Net6Client7ConnectERKSstS2_':|~path removed~My Documents\CodeBlock\xsera\Engine\Net\Client.cpp|29|undefined reference to `_htons@4'|obj\Debug\Engine\Net\MessageDecode.o||In function `_ZN3Net15MessageEncoding6EncodeERKNS_7MessageE':|~path removed~My Documents\CodeBlock\xsera\Engine\Net\MessageDecode.cpp|24|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\Engine\Net\MessageDecode.cpp|28|undefined reference to `_htonl@4'|obj\Debug\Engine\Net\MessageDecode.o||In function `_ZN3Net15MessageEncoding6DecodeEP11_ENetPacket':|~path removed~My Documents\CodeBlock\xsera\Engine\Net\MessageDecode.cpp|46|undefined reference to `_ntohs@4'|~path removed~My Documents\CodeBlock\xsera\Engine\Net\MessageDecode.cpp|49|undefined reference to `_ntohl@4'|obj\Debug\Engine\Net\Server.o||In function `_ZNSt3mapIjP9_ENetPeerSt4lessIjESaISt4pairIKjS1_EEEC1Ev':|C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\c++\3.4.5\ext\new_allocator.h:(.text+0x23)||undefined reference to `_htons@4'|obj\Debug\External\eNet\host.o||In function `enet_host_connect':|~path removed~My Documents\CodeBlock\xsera\External\eNet\host.c|178|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\host.c|179|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\host.c|180|undefined reference to `_htonl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\host.c|181|undefined reference to `_htonl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\host.c|182|undefined reference to `_htonl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\host.c|183|undefined reference to `_htonl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\host.c|184|undefined reference to `_htonl@4'|obj\Debug\External\eNet\host.o:~path removed~My Documents\CodeBlock\xsera\External\eNet\host.c|185|more undefined references to `_htonl@4' follow|obj\Debug\External\eNet\peer.o||In function `enet_peer_send':|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|114|undefined reference|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|115|undefined reference to `_htonl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|134|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|136|undefined reference to `_htonl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|137|undefined reference to `_htonl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|138|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|154|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|160|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|161|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|166|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|167|undefined reference to `_htons@4'|obj\Debug\External\eNet\peer.o||In function `enet_peer_disconnect_now':|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|402|undefined reference to `_htonl@4'|obj\Debug\External\eNet\peer.o||In function `enet_peer_disconnect':|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|432|undefined reference to `_htonl@4'|obj\Debug\External\eNet\peer.o||In function `enet_peer_queue_outgoing_command':|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|551|undefined reference to `_htons@4'|obj\Debug\External\eNet\peer.o||In function `enet_peer_queue_incoming_command':|~path removed~My Documents\CodeBlock\xsera\External\eNet\peer.c|622|undefined reference to `_ntohs@4'|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_handle_connect':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|264|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|295|undefined reference to `_ntohs@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|296|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|297|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|298|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|299|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|300|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|319|undefined reference to `_ntohs@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|355|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|356|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|366|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|367|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|368|undefined reference to `_htonl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|369|undefined reference to `_htonl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|370|undefined reference to `_htonl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|371|undefined reference to `_htonl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|372|undefined reference to `_htonl@4'|obj\Debug\External\eNet\protocol.o:~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|373|more undefined references to `_htonl@4' follow|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_handle_send_reliable':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|391|undefined reference to `_ntohs@4'|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_handle_send_unsequenced':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|417|undefined reference to `_ntohs@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|422|undefined reference to `_ntohs@4'|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_handle_send_unreliable':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|466|undefined reference to `_ntohs@4'|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_handle_send_fragment':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|499|undefined reference to `_ntohs@4'|obj\Debug\External\eNet\protocol.o:~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|505|more undefined references to `_ntohs@4' follow|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_handle_send_fragment':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|515|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|516|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|517|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|518|undefined reference to `_ntohl@4'|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_handle_bandwidth_limit':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|601|undefined reference to `_ntohl@4'|obj\Debug\External\eNet\protocol.o:~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|602|more undefined references to `_ntohl@4' follow|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_handle_acknowledge':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|661|undefined reference to `_ntohs@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|705|undefined reference to `_ntohs@4'|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_handle_verify_connect':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|745|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|745|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|745|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|745|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|757|undefined reference to `_ntohs@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|759|undefined reference to `_ntohs@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|770|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|781|undefined reference to `_ntohl@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|782|undefined reference to `_ntohl@4'|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_handle_incoming_commands':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|803|undefined reference to `_ntohs@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|871|undefined reference to `_ntohs@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|943|undefined reference to `_ntohs@4'|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_send_acknowledgements':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|1042|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|1043|undefined reference to `_htons@4'|obj\Debug\External\eNet\protocol.o||In function `enet_protocol_send_outgoing_commands':|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|1388|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\protocol.c|1393|undefined reference to `_htons@4'|obj\Debug\External\eNet\win32.o||In function `enet_initialize':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|19|undefined reference to `_WSAStartup@8'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|25|undefined reference to `_WSACleanup@0'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|30|undefined reference to `_timeBeginPeriod@4'|obj\Debug\External\eNet\win32.o||In function `enet_deinitialize':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|38|undefined reference to `_timeEndPeriod@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|40|undefined reference to `_WSACleanup@0'|obj\Debug\External\eNet\win32.o||In function `enet_time_get':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|46|undefined reference to `_timeGetTime@0'|obj\Debug\External\eNet\win32.o||In function `enet_time_set':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|52|undefined reference to `_timeGetTime@0'|obj\Debug\External\eNet\win32.o||In function `enet_address_set_host':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|60|undefined reference to `_gethostbyname@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|64|undefined reference to `_inet_addr@4'|obj\Debug\External\eNet\win32.o||In function `enet_address_get_host_ip':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|79|undefined reference to `_inet_ntoa@4'|obj\Debug\External\eNet\win32.o||In function `enet_address_get_host':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|94|undefined reference to `_gethostbyaddr@12'|obj\Debug\External\eNet\win32.o||In function `enet_socket_create':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|106|undefined reference to `_socket@12'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|118|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|127|undefined reference to `_bind@12'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|127|undefined reference to `_listen@8'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|135|undefined reference to `_closesocket@4'|obj\Debug\External\eNet\win32.o||In function `enet_socket_set_option':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|152|undefined reference to `_ioctlsocket@12'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|157|undefined reference to `_setsockopt@20'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|161|undefined reference to `_setsockopt@20'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|165|undefined reference to `_setsockopt@20'|obj\Debug\External\eNet\win32.o||In function `enet_socket_connect':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|182|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|185|undefined reference to `_connect@12'|obj\Debug\External\eNet\win32.o||In function `enet_socket_accept':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|195|undefined reference to `_accept@12'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|205|undefined reference to `_ntohs@4'|obj\Debug\External\eNet\win32.o||In function `enet_socket_destroy':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|214|undefined reference to `_closesocket@4'|obj\Debug\External\eNet\win32.o||In function `enet_socket_send':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|229|undefined reference to `_htons@4'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|233|undefined reference to `_WSASendTo@36'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|243|undefined reference to `_WSAGetLastError@0'|obj\Debug\External\eNet\win32.o||In function `enet_socket_receive':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|263|undefined reference to `_WSARecvFrom@36'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|273|undefined reference to `_WSAGetLastError@0'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|289|undefined reference to `_ntohs@4'|obj\Debug\External\eNet\win32.o||In function `enet_socket_wait':|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|314|undefined reference to `_select@20'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|324|undefined reference to `___WSAFDIsSet@8'|~path removed~My Documents\CodeBlock\xsera\External\eNet\win32.c|327|undefined reference to `___WSAFDIsSet@8'|..\..\..\Programming Includes\lib\SDLmain.lib(.\release_nostdio\SDL_win32_main.obj):(.text[_ShowError]+0x9)||undefined reference to `__imp____iob_func'|..\..\..\Programming Includes\lib\SDLmain.lib(.\release_nostdio\SDL_win32_main.obj):(.text[_cleanup_output]+0x3)||undefined reference to `__imp____iob_func'|..\..\..\Programming Includes\lib\SDLmain.lib(.\release_nostdio\SDL_win32_main.obj):(.text[_main]+0x5)||undefined reference to `___security_cookie'|..\..\..\Programming Includes\lib\SDLmain.lib(.\release_nostdio\SDL_win32_main.obj):(.text[_main]+0x65)||undefined reference to `__alloca_probe_16'|..\..\..\Programming Includes\lib\SDLmain.lib(.\release_nostdio\SDL_win32_main.obj):(.text[_main]+0x80)||undefined reference to `@__security_check_cookie@4'|..\..\..\Programming Includes\lib\SDLmain.lib(.\release_nostdio\SDL_win32_main.obj):(.text[_main]+0xbe)||undefined reference to `@__security_check_cookie@4'|16]+0x5)||undefined reference to `___security_cookie'|16]+0x43)||undefined reference to `__alloca_probe_16'|16]+0x72)||undefined reference to `__alloca_probe_16'|16]+0x9b)||undefined reference to `@__security_check_cookie@4|||=== Build finished: 136 errors, 1 warnings ===|


I'm pretty sure that the "htons" ones (and the similar ones to those) are from eNet, but I have enet.lib and enet.dll included. In fact, checking all of my .dlls and .libs, they're included and in the right place. Help?

adam_o
_______________________My computer stats:Xcode 3.1.2Mac OS 10.5.8---Visual C++ 2008 Express EditionWindows XP---NetBeansUbuntu 9.04---Help needed here!
mobeen
mobeen
Hi,
As far as i can see you are calling some functions but the linker is not able to resolve them. This usually happens when the calling convetion of the function is not the same as what the linker expects.
Proud to be a PAKISTANI.
adam_o
adam_o
Quote:
Original post by mobeen
Hi,
As far as i can see you are calling some functions but the linker is not able to resolve them. This usually happens when the calling convetion of the function is not the same as what the linker expects.


Thanks for the continued help. However, I cannot see how standard OpenGL calls would be OK on Mac OS X but not on Windows XP. If it would help, I can include the project files at your request.
_______________________My computer stats:Xcode 3.1.2Mac OS 10.5.8---Visual C++ 2008 Express EditionWindows XP---NetBeansUbuntu 9.04---Help needed here!
mobeen
mobeen
I donot use codeblocks so including project files wouldn't really help. Anyways, i think its mode an issue with the compiler settings rather than anythihng else i think.
Proud to be a PAKISTANI.
adam_o
adam_o
If these errors (or similar ones) came up in VC++, what settings would you look at?
_______________________My computer stats:Xcode 3.1.2Mac OS 10.5.8---Visual C++ 2008 Express EditionWindows XP---NetBeansUbuntu 9.04---Help needed here!
mobeen
mobeen
Quote:
Original post by adam_o
If these errors (or similar ones) came up in VC++, what settings would you look at?

I will look at all of the settings related to the linker.
Proud to be a PAKISTANI.
adam_o
adam_o
I'm getting a few warnings in front of all the errors I'm getting, and I wonder if it could have anything to do with the errors I'm getting:

Warning: .drectve `-defaultlib:LIBC ' unrecognizedWarning: .drectve `-defaultlib:OLDNAMES ' unrecognizedWarning: .drectve `/manifestdependency:"type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'" /DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized


Also, when I undefined GL_VERSION_2_0, I got rid of the GLEW errors:

(in glew.h)
/* ----------------------------- GL_VERSION_2_0 ---------------------------- */#undef GL_VERSION_2_0 //this is the line I added#ifndef GL_VERSION_2_0#define GL_VERSION_2_0 1


But I still have all of the other errors.

All help is appreciated and thanks in advance,

adam_o
_______________________My computer stats:Xcode 3.1.2Mac OS 10.5.8---Visual C++ 2008 Express EditionWindows XP---NetBeansUbuntu 9.04---Help needed here!
MARS_999
MARS_999
Are you using MSVC++ 2008? BTW why not drop GLEW and try GLEE, I find GLEE so much easier to setup vs. GLEW but they are both simple to use, just GLEE has lazy loading you don't do anything and you have all the extensions there after RC has been setup.

#pragma comment(lib, "glee.lib")
#include "glee.h"

//do some GL3.0 coding!!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.