From: colin AT fu DOT is DOT saga-u DOT ac DOT jp (Colin Peters) Subject: RE: link problem 13 Oct 1998 10:00:05 -0700 Message-ID: <003e01bdf668$e943ac80$fa173185.cygnus.gnu-win32@gbird0.fu.is.saga-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit To: "vsevolod mick tonkonoh" Cc: "GNU-win32" vsevolod mick tonkonoh wrote: >I have just installed Mingw32 ( I am new to gcc) >and I tried to compile simple program using OpenGL >library.As I understand, libopengl32.a is what I need for it. My program consists of little main() with one call to glLoadIdentity(). >Here is the error message: > >gcc -o prog main.o -L. -lopengl32 >main.o(.text+0x18):main.cc: undefined reference to `glLoadIdentity(void)' Which gl header files are you using or did you write the prototype for glLoadIdentity yourself? One reason this may not work is that the functions in the OpenGL use "standard call" and need to be prototyped with __attribute__((stdcall)). Generally this is #defined as part of WINAPI or STDCALL or, in the gl headers, APIENTRY. The prototype for glLoadIdentity looks like this in the headers I have: WINGDIAPI void APIENTRY glLoadIdentity (void); Note that you need to include windows.h to get APIENTRY and WINGDIAPI defined correctly. Good luck, Colin. - Colin Peters - colin at fu.is.saga-u.ac.jp - http://www.geocities.com/Tokyo/Towers/6162/index.html - Go not to usenet for counsel, for it will say both - 'yes' and 'no' and 'try another newsgroup'. - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".