Sign in to follow this  
WaterMonkey314

MinGW assembler/linker error

Recommended Posts

In my computer science class, we wre beginning a unit with OpenGL, so I installed the stuff my instructor provided on my Vista computer. This included various OpenGL and GLUT libraries, C++ headers, and dll's. However, things started going wrong - I first got the error that g++ couldn't find cc1plus. After I tried copying cc1plus to C:\MinGW\bin, that error went away, only to be replaced by a number of assembler errors. When I tried to compile the test file provided by my instructor, I got this:
Quote:
C:\Users\----\Documents\GraphicsFiles\GraphicsFiles>g++ testgl.cpp -lglut32 -lglu32 -lopengl ./ccCUbaaa.s: Assembler messages: ./ccCUbaaa.s:4: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:5: Error: invalid character '_' in mnemonic ./ccCUbaaa.s:14: Error: junk `@12' after expression ./ccCUbaaa.s:19: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:20: Error: invalid character '_' in mnemonic ./ccCUbaaa.s:27: Error: junk `@8' after expression ./ccCUbaaa.s:32: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:33: Error: invalid character '_' in mnemonic ./ccCUbaaa.s:40: Error: junk `@8' after expression ./ccCUbaaa.s:139: Error: junk `@4' after expression ./ccCUbaaa.s:149: Error: junk `@16' after expression ./ccCUbaaa.s:155: Error: junk `@12' after expression ./ccCUbaaa.s:161: Error: junk `@12' after expression ./ccCUbaaa.s:167: Error: junk `@12' after expression ./ccCUbaaa.s:173: Error: junk `@12' after expression ./ccCUbaaa.s:179: Error: junk `@12' after expression ./ccCUbaaa.s:185: Error: junk `@12' after expression ./ccCUbaaa.s:191: Error: junk `@12' after expression ./ccCUbaaa.s:197: Error: junk `@12' after expression ./ccCUbaaa.s:203: Error: junk `@12' after expression ./ccCUbaaa.s:209: Error: junk `@12' after expression ./ccCUbaaa.s:215: Error: junk `@12' after expression ./ccCUbaaa.s:220: Error: junk `@8' after expression ./ccCUbaaa.s:223: Error: junk `@4' after expression ./ccCUbaaa.s:226: Error: junk `@4' after expression ./ccCUbaaa.s:229: Error: junk `@4' after expression ./ccCUbaaa.s:242: Error: junk `@4' after expression ./ccCUbaaa.s:248: Error: junk `@16' after expression ./ccCUbaaa.s:250: Error: junk `@0' after expression ./ccCUbaaa.s:280: Error: junk `@16' after expression ./ccCUbaaa.s:283: Error: junk `@4' after expression ./ccCUbaaa.s:285: Error: junk `@0' after expression ./ccCUbaaa.s:296: Error: junk `@32' after expression ./ccCUbaaa.s:299: Error: junk `@4' after expression ./ccCUbaaa.s:301: Error: junk `@0' after expression ./ccCUbaaa.s:320: Error: junk `@72' after expression ./ccCUbaaa.s:369: Error: junk `@0' after expression ./ccCUbaaa.s:388: Error: junk `@72' after expression ./ccCUbaaa.s:390: Error: junk `@0' after expression ./ccCUbaaa.s:393: Error: junk `@0' after expression ./ccCUbaaa.s:398: Error: junk `@8' after expression ./ccCUbaaa.s:402: Error: junk `@8' after expression ./ccCUbaaa.s:442: Error: junk `@16' after expression ./ccCUbaaa.s:444: Error: junk `@0' after expression ./ccCUbaaa.s:455: Error: junk `@16' after expression ./ccCUbaaa.s:457: Error: junk `@0' after expression ./ccCUbaaa.s:468: Error: junk `@16' after expression ./ccCUbaaa.s:470: Error: junk `@0' after expression ./ccCUbaaa.s:481: Error: junk `@16' after expression ./ccCUbaaa.s:483: Error: junk `@0' after expression ./ccCUbaaa.s:511: Error: junk `@8' after expression ./ccCUbaaa.s:517: Error: junk `@8' after expression ./ccCUbaaa.s:520: Error: junk `@4' after expression ./ccCUbaaa.s:523: Error: junk `@4' after expression ./ccCUbaaa.s:527: Error: junk `@4' after expression ./ccCUbaaa.s:530: Error: junk `@4' after expression ./ccCUbaaa.s:533: Error: junk `@4' after expression ./ccCUbaaa.s:536: Error: junk `@4' after expression ./ccCUbaaa.s:538: Error: junk `@0' after expression ./ccCUbaaa.s:542: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:543: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:544: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:545: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:546: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:547: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:548: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:549: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:550: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:551: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:552: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:553: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:554: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:555: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:556: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:557: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:558: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:559: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:560: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:561: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:562: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:563: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:564: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:565: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:566: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:567: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:568: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:569: Error: junk at end of line, first unrecognized character is `@' ./ccCUbaaa.s:571: Error: junk at end of line, first unrecognized character is `@'
The code I compiled:
/**************************************************
** Programmer:	Aaron Cardona
** File:		testgl.cpp
** Last Modi:	20 Mar 2008
** Description:	Displays a ball.  It's awesome.
**************************************************/

#include<windows.h>
#include<GL/gl.h>
#include<GL/glut.h>


void init(void)
{
	// define light properties
	GLfloat mat_specular[]= {1.0, 1.0, 1.0, 1.0};
	GLfloat mat_shininess[]= {5.0};

	GLfloat light_position0[]= {1.0, 0.0, 0.0, 1.0};
	GLfloat light_position1[]= {0.0, 1.0, 0.0, 1.0};
	GLfloat light_position2[]= {0.0, 0.0, 1.0, 1.0};

	GLfloat white_light[]= {1.0, 1.0, 1.0, 1.0};
	GLfloat red_light[]= {1.0, 0.0, 0.0, 1.0};
	GLfloat green_light[]= {0.0, 1.0, 0.0, 1.0};
	GLfloat blue_light[]= {0.0, 0.0, 1.0, 0.0};
	GLfloat orange_light[]={1.0,0.5, 0.0, 1.0};

	GLfloat lmodel_ambient[]= {0.1, 0.1, 0.1, 0.1, 1.0};

	glShadeModel(GL_SMOOTH);
	glClearColor(0.0, 0.0, 0.0, 1.0);

	// define material
	glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
	glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);

	// set up light0
	glLightfv(GL_LIGHT0, GL_POSITION, light_position0);
	glLightfv(GL_LIGHT0, GL_DIFFUSE, orange_light);
	glLightfv(GL_LIGHT0, GL_SPECULAR, orange_light);

	// set up light1
	glLightfv(GL_LIGHT1, GL_POSITION, light_position1);
	glLightfv(GL_LIGHT1, GL_DIFFUSE, green_light);
	glLightfv(GL_LIGHT1, GL_SPECULAR, green_light);

	// set up light2
	glLightfv(GL_LIGHT2, GL_POSITION, light_position2);
	glLightfv(GL_LIGHT2, GL_DIFFUSE, blue_light);
	glLightfv(GL_LIGHT2, GL_SPECULAR, blue_light);

	// set up light model
	glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
//	glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);

	// enable lighting and depth testing
	glEnable(GL_LIGHTING);
	glEnable(GL_DEPTH_TEST);

	// enable the lights
	glEnable(GL_LIGHT0);
//	glEnable(GL_LIGHT1);

}

void display(void)
{
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glutSolidSphere(1.0,16,16);
//	glutSolidCube(1.0);
//	glEnable(GL_LIGHT0);
	glutSwapBuffers();
}

void reshape(int w, int h)
{
	glViewport(0, 0, (GLsizei)w, (GLsizei)h);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluPerspective(30, (GLfloat)w/(GLfloat)h, 1.0, 100.0);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
	gluLookAt(0, 0, 10, 0, 0, 0, 0, 1, 0);
}

void keyboard(unsigned char key, int x, int y)
{
	switch(key){
		case 'i':				// reset
		case 'I':
			glLoadIdentity();
			gluLookAt(0, 0, 10, 0, 0, 0, 0, 1, 0);
			glutPostRedisplay();
			break;
		case 'p':
		case 'P':
			glutFullScreen();
			break;
		case 'o':
		case 'O':
			glutReshapeWindow(640,480);
			glutPositionWindow(100,100);
      break;
		case 27:
			exit(0);
			break;
		default:
			break;
	}
}

void arrow_keys(int a_keys, int x, int y)  // Create Special Function (required for arrow keys)
{
  switch (a_keys){
    case GLUT_KEY_UP:     
		glRotatef(-15.0,1.0,0.0,0.0);
		glutPostRedisplay();
		break;
    case GLUT_KEY_DOWN:
		glRotatef(15.0,1.0,0.0,0.0);
		glutPostRedisplay();
		break;
	case GLUT_KEY_RIGHT:
		glRotatef(15.0,0.0,1.0,0.0);
		glutPostRedisplay();
		break;
	case GLUT_KEY_LEFT:
		glRotatef(-15.0,0.0,1.0,0.0);
		glutPostRedisplay();
		break;
    default:
      break;
  }
}

int main(int argc, char **argv)
{
	glutInitWindowSize(640, 480);
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA);
	glutCreateWindow("Just A Basic Sphere");
	init();
	glutReshapeFunc(reshape);
	glutKeyboardFunc(keyboard);
	glutSpecialFunc(arrow_keys);
	glutDisplayFunc(display);
	glutMainLoop();
	return 0;
}

Share this post


Link to post
Share on other sites
Would it also cause an issue if I have Dev-Cpp v4.9.9.2(w/ MinGW v3.4.3) installed on the same system?

Also, is it possible to retrofit the Dev-Cpp MinGW to compile OpenGL?

And yes, I have added put C:\MinGW\bin in my PATH.

Edit: By the way, the MinGW I tried to use is v3.4.5.

Share this post


Link to post
Share on other sites
Quote:
Original post by WaterMonkey314
Would it also cause an issue if I have Dev-Cpp v4.9.9.2(w/ MinGW v3.4.3) installed on the same system?

Also, is it possible to retrofit the Dev-Cpp MinGW to compile OpenGL?

And yes, I have added put C:\MinGW\bin in my PATH.

Edit: By the way, the MinGW I tried to use is v3.4.5.

Devcpp might be related to the issue indeed. Devcpp is considered to be outdated and not in active development anymore. My personal proposal is to uninstall it and try again after that.

Code::Blocks seems to be a better alternative to Devcpp if you would like to use the mingw compiler in combination with a fancy IDE on win32:
Code::Blocks - cross platform development IDE

Share this post


Link to post
Share on other sites
That's sad Dev's discontinued - I liked it.

I'll try uninstalling it and MinGW, and then reinstalling just MinGW.

Oh, and I forgot I've also got DJGPP on the same system. :D On top of that, I think my XP system has MinGW, an old version of Dev, DJGPP, and Borland. Should I get rid of some of these also?

Thank you both for the help!

Share this post


Link to post
Share on other sites
Quote:
Original post by WaterMonkey314
Oh, and I forgot I've also got DJGPP on the same system. :D On top of that, I think my XP system has MinGW, an old version of Dev, DJGPP, and Borland. Should I get rid of some of these also?

Thank you both for the help!

It seems that djgpp is not related to mingw so no need to remove. I would uninstall all devcpp and mingw versions.

After that either download:
1. Code::Blocks with mingw (in case you would like to use an IDE)
2. MinGW installer (in case you would like to just use mingw directly from the command line)

Share this post


Link to post
Share on other sites
Yuck...I uninstalled Dev-c++ and reinstalled MinGW, but I'm still having problems...

Is there a way to add MinGW to Code::Blocks without reinstalling it, too? (The current one seems to be perma-broken)

Share this post


Link to post
Share on other sites
Sorry about the double post, but this is an important finding I made:

After redownloading and reinstalling MinGW (again) I'm still getting these assembler errors. However, if I don't put the OpenGL files where they're supposed to go, the assembler errors go away and are replaced by plain "not defined" errors. Unfortunately, I still can't get it to compile plain C++ code either. It still says it can't execute 'ld'.

Share this post


Link to post
Share on other sites
DJGPP may create a conflict since its gcc as well, make sure the MinGW path is listed first in your PATH variable, if possible, remove the djgpp path, remove the cc1plus you copied from c:\MinGW\bin, (I don't have a copy of cc1plus on my c:\MinGW\bin directory), and finally on a command line window run "gcc --version" to make sure you have the right one, mine says:

Quote:

C:\MinGW\bin>gcc --version
gcc (GCC) 3.4.5 (mingw special)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Share this post


Link to post
Share on other sites
My DJGPP path is in front of the MinGW one, but I've been using the g++ command.

I've also noticed some sort of version with a bugfix for Vista, so I'll try that. I'll report the results.

Share this post


Link to post
Share on other sites
I moved the MinGW path thingy to before the DJGPP one, but it's still not working. (and I think I might have broken DJGPP, too.-I'm getting the cc1plus error with gpp, which used to work.)

It seems that I either have a problem with cc1plus and/or the assembler.

Running Code::Blocks with it auto-detecting MinGW also returns an assembler error. (or the cc1plus error if I didn't re-install the workaround.)

Thank you guys again for the help.

Share this post


Link to post
Share on other sites
Done. Now MinGW works! (sort of)

It still can't find the OpenGL files properly. I put them where I thought they should go, and also added those filepaths to their respective search directories. That still yields this: (This also seems to explain all those "junk" things the earlier installs were complaining about)

PS: The source code is in Dev-Cpp because I put all my stuff there and don't want to move it...the actual .o and .h files are with Code::Blocks, though.

Quote:

Compiling: C:\Dev-Cpp\ICS\OpenGL\testgl.cpp
Linking console executable: C:\Dev-Cpp\ICS\OpenGL\testgl.exe
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x1c): undefined reference to `___glutInitWithExit@12'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x3d): undefined reference to `___glutCreateWindowWithExit@8'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x5d): undefined reference to `___glutCreateMenuWithExit@8'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x1ed): undefined reference to `_glShadeModel@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x218): undefined reference to `_glClearColor@16'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x236): undefined reference to `_glMaterialfv@12'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x254): undefined reference to `_glMaterialfv@12'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x272): undefined reference to `_glLightfv@12'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x293): undefined reference to `_glLightfv@12'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x2b4): undefined reference to `_glLightfv@12'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x2d2): undefined reference to `_glLightfv@12'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x2f3): undefined reference to `_glLightfv@12'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x314): more undefined references to `_glLightfv@12' follow
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x38d): undefined reference to `_glLightModelfv@8'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x39c): undefined reference to `_glEnable@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x3ab): undefined reference to `_glEnable@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x3ba): undefined reference to `_glEnable@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x3d4): undefined reference to `_glClear@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x3f1): undefined reference to `_glutSolidSphere@16'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x3f9): undefined reference to `_glutSwapBuffers@0'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x424): undefined reference to `_glViewport@16'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x433): undefined reference to `_glMatrixMode@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x43b): undefined reference to `_glLoadIdentity@0'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x465): undefined reference to `_gluPerspective@32'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x474): undefined reference to `_glMatrixMode@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x47c): undefined reference to `_glLoadIdentity@0'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x4ba): undefined reference to `_gluLookAt@72'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x530): undefined reference to `_glLoadIdentity@0'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x56e): undefined reference to `_gluLookAt@72'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x576): undefined reference to `_glutPostRedisplay@0'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x57d): undefined reference to `_glutFullScreen@0'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x593): undefined reference to `_glutReshapeWindow@8'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x5aa): undefined reference to `_glutPositionWindow@8'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x61e): undefined reference to `_glRotatef@16'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x626): undefined reference to `_glutPostRedisplay@0'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x653): undefined reference to `_glRotatef@16'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x65b): undefined reference to `_glutPostRedisplay@0'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x685): undefined reference to `_glRotatef@16'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x68d): undefined reference to `_glutPostRedisplay@0'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x6b7): undefined reference to `_glRotatef@16'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x6bf): undefined reference to `_glutPostRedisplay@0'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x700): undefined reference to `_glutInitWindowSize@8'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x724): undefined reference to `_glutInitDisplayMode@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x747): undefined reference to `_glutReshapeFunc@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x756): undefined reference to `_glutKeyboardFunc@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x765): undefined reference to `_glutSpecialFunc@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x774): undefined reference to `_glutDisplayFunc@4'
C:\Dev-Cpp\ICS\OpenGL\testgl.o:testgl.cpp:(.text+0x77c): undefined reference to `_glutMainLoop@0'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
47 errors, 0 warnings

Share this post


Link to post
Share on other sites
Great!

you will also need to get and add glut (or freeglut) to your linker flags, though if you did not get any compilation errors regarding the glut header, you probably already have it.

Just add glut as well as mvBarracuda said, sorry, I have no experience with code::blocks, but I do know they should go into the "additional libraries" or something-along-those-lines field.

Cheers!

Share this post


Link to post
Share on other sites
Hurrah! 23 errors now! (better, I'm almost there).

I'm not sure if Code::Blocks has a thing where I can just add the opengl library file without finding it, and I'm not sure where it went/is. I did get glu.o, glu32.o, glut32.o, and glaux.o linked, though.

Share this post


Link to post
Share on other sites
Quote:
Original post by WaterMonkey314
Hurrah! 23 errors now! (better, I'm almost there).

So post the remaining linker errors; otherwhise it's pretty hard to help you.

Quote:
Original post by WaterMonkey314
I'm not sure if Code::Blocks has a thing where I can just add the opengl library file without finding it, and I'm not sure where it went/is. I did get glu.o, glu32.o, glut32.o, and glaux.o linked, though.

Are you sure you mean glu32.o? MinGW / linux libraries use an .a file extension while .o files are compiled object files.

If you decided to install the Code::Blocks + MinGW package linked above it should simply work if you follow these steps:
1. Open Code::Blocks project file for the software you're trying to build.
2. Project >> Build options... >> Linker settings.
3. Add your linker flags there, but don't use the file browser to search for an .a file. Instead simply type in the library name (e.g. libopengl32.a) and press OK.
4. Build your project.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this