-2

I'm new to graphics in Windows. Any help would be much appreciated.

I installed mingw and it seemed to work.

Then I downloaded Codeblocks and that seemed to work too.

Next I downloaded the freeglut package, unzipped it and copied all the files to the various locations.

When I tried to compile Tutorial 01 provided in ogldev-source, I got eleven error messages consisting of a series of undefined references such as:

undefined reference to '_imp_glutinit/windowsPosition@@'
undefined reference to 'glClearColor@16'
hrbrmstr
  • 77,368
  • 11
  • 139
  • 205

1 Answers1

0

You only need to link the .dll and .libs to the compiler in code blocks I would recommend you this post this.

Community
  • 1
  • 1
  • Its generally the same except you would , just link the name of your dlls or libs – Mrkillius24 Jan 25 '15 at 23:21
  • Thanks very much. The codeblocks screen looks somewhat different, but I managed to find the settings tab, and linked the library files. I now get 2 error messages instead of 11. But even after linking to all the .lib files I can find, I still cannot get rid of the 2 errors, which are undefined reference to 'glclear@4' and undefined reference to 'glclearcolor@16'. I must be missing something. – James Ng Jan 29 '15 at 04:22
  • That means you had a linking problem. I will recommend this article I found on the code block's website for the windows tutorial to install freeglut and make sure all the functions work. [link](http://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks) – Mrkillius24 Jan 30 '15 at 11:52
  • I followed the excellent tutorial step by step, all seems fine except at the very end when I tried to run the sample code that came with freeglut, I again got two "undefined reference" errors. I posted these errors on this site. I'm kind of lost what to do next. Appreciate your help. – James Ng Jan 30 '15 at 17:09