Author Topic: compilation error  (Read 4676 times)

Offline rexona

  • Single posting newcomer
  • *
  • Posts: 6
compilation error
« on: November 17, 2005, 08:23:54 am »
hi guys...

when i try to compile my code i got this kind of error

Switching to target: default
Linking console executable: lab01.exe
.objs/lab01.o(.text+0x2b7): In function `SimplePolygon::draw()':
: undefined reference to `glDisable'
.objs/lab01.o(.text+0x2c7): In function `SimplePolygon::draw()':
: undefined reference to `glDisable'
.objs/lab01.o(.text+0x2d4): In function `SimplePolygon::draw()':
: undefined reference to `glBegin'
.objs/lab01.o(.text+0x2f1): In function `SimplePolygon::draw()':
: undefined reference to `glColor3f'
.objs/lab01.o(.text+0x30e): In function `SimplePolygon::draw()':
: undefined reference to `glVertex3f'
.objs/lab01.o(.text+0x32b): In function `SimplePolygon::draw()':
: undefined reference to `glVertex3f'

what did i miss there? what can i do? what should i do?

i'm running on slackware current

thx guys

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: compilation error
« Reply #1 on: November 17, 2005, 08:35:06 am »
Add GL in link libraries...
Be patient!
This bug will be fixed soon...

Offline rexona

  • Single posting newcomer
  • *
  • Posts: 6
Re: compilation error
« Reply #2 on: November 17, 2005, 11:26:30 am »
sorry? link lib? where can i find it?

i'm sorry i'm newbie on both linux and codeblocks

thx

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: compilation error
« Reply #3 on: November 17, 2005, 12:12:50 pm »
Go to "Project->Build options->Linker->Link libraries", click "Add", type GL and press "OK".
Be patient!
This bug will be fixed soon...

Offline rexona

  • Single posting newcomer
  • *
  • Posts: 6
Re: compilation error
« Reply #4 on: November 17, 2005, 03:01:48 pm »
i've tried that so many times, but still cannot work  :(

what should i include?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: compilation error
« Reply #5 on: November 17, 2005, 07:21:02 pm »
i've tried that so many times, but still cannot work  :(
You might want to try the OpenGL template provided with Code::Blocks. This normally works and you can copy/paste the settings.
You might also install the OpenGL DevPack (use the DevPack plugin for download) to make sure you have the right libraries and other "stuff" installed.

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline rexona

  • Single posting newcomer
  • *
  • Posts: 6
Re: compilation error
« Reply #6 on: November 18, 2005, 12:27:46 am »
Quote
You might want to try the OpenGL template provided with Code::Blocks. This normally works and you can copy/paste the settings.

can you tell me please how to do that?

what do i need in my slackware to do opengl project?

« Last Edit: November 18, 2005, 12:32:43 am by rexona »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: compilation error
« Reply #7 on: November 18, 2005, 07:58:42 am »
can you tell me please how to do that?
Open Code::Blocks, select "File" -> "New Project...". Scroll down in the templates and seelect the "OpenGL Application". Click on "Create". Right-Click on the project and veryfiy the settings made in the project options and build options. Especially make sure the path's is setup (added) in a way the compiler can find the OpenGL libs and headers.

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline rexona

  • Single posting newcomer
  • *
  • Posts: 6
Re: compilation error
« Reply #8 on: November 20, 2005, 10:20:31 am »
i couldn't find the "OpenGL Application" template :( so how?

sorry and thx

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: compilation error
« Reply #9 on: November 20, 2005, 11:23:04 am »
i couldn't find the "OpenGL Application" template :( so how?
I didn't notice that you are now on slackware. Your first post was about an ".exe " so I thought this in a Win32 application. The OpenGL template is only available for Windows. Sorry. But: I guess it should be easy possible to adopt the template for Linux. You might want to download the source code of Code::Blocks, extract the OpenGL template (it's under templates\win32) and give it a try.

I don't have access to a Linux box otherwise I would provide you with it.

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: compilation error
« Reply #10 on: November 20, 2005, 11:26:30 am »
The OpenGL template is only available for Windows.
...wait a minute: There should also be the GLFW template available und Linux. This is based on OpenGL (as far as I know) so it might be a good starting point as well. You should only have to remove the "glfw" library...?!

Please, somebody correct me, if I'm wrong.

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ