   g++ Lesson 1(Linker errors?)
  Okay, so I've been playing around with NeHe's lesson 1 using g++ under Windows(MingW).  I'm fairly new to c++, and completely new to Windows GUI, so I assume this could be part of the problem.  I've tried compiling with -mwindows, -lopengl32, -lglu32, and various combinations of these.  I've tried including  #pragma comment(lib,"opengl32.lib")#pragma comment(lib,"glu32.lib")as well, with no luck.  Anyways, on to the error messages!C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x31):main.cpp: undefined reference to `glViewport@16'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x40):main.cpp: undefined reference to `glMatrixMode@4'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x48):main.cpp: undefined reference to `glLoadIdentity@0'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x76):main.cpp: undefined reference to `gluPerspective@32'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x85):main.cpp: undefined reference to `glMatrixMode@4'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x8d):main.cpp: undefined reference to `glLoadIdentity@0'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0xa2):main.cpp: undefined reference to `glShadeModel@4'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0xcd):main.cpp: undefined reference to `glClearColor@16'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0xda):main.cpp: undefined reference to `glClearDepth@8'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0xe9):main.cpp: undefined reference to `glEnable@4'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0xf8):main.cpp: undefined reference to `glDepthFunc@4'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x10f):main.cpp: undefined reference to `glHint@8'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x12c):main.cpp: undefined reference to `glClear@4'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x134):main.cpp: undefined reference to `glLoadIdentity@0'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x192):main.cpp: undefined reference to `wglMakeCurrent@8'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x1cd):main.cpp: undefined reference to `wglDeleteContext@4'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x7cd):main.cpp: undefined reference to `wglCreateContext@4'C:\DOCUME~1\JAMESG~1\LOCALS~1\Temp/ccYDaaaa.o(.text+0x82f):main.cpp: undefined reference to `wglMakeCurrent@8'This is using the command line: g++ -lopengl32 -lglu32 main.cpp -o main.exe -mwindowsAny and all help is greatly appreciated(when are we going to get GDNet forum search back?  I can't be the first with this problem, and the Google GDNet search only gave me the ideas outlined above.)Edit: Because I suck at source tags.   
  try: g++ main.cpp -lopengl32 -lglu32 -lgdi32 -mwindows -o main.exesome versions (?) of gcc has some issues with what order stuff is linked. hope this solves your problem...   ;  Using your advice I fooled around more with the order of my command line argument and... it works!  Thanks, feel stupid for not thinking that one up myself.   