Author Topic: Ogre + Codeblocks = problem with linker  (Read 5923 times)

Offline EpSiLoN

  • Single posting newcomer
  • *
  • Posts: 4
Ogre + Codeblocks = problem with linker
« on: August 25, 2005, 09:18:46 pm »
Hi,
i compiled all ogre's sources using Codeblocks and without errors. I tried to compile to ogre application from template but i have this problem with linker:

Project   : OGRE_Sample
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\Ugo\Documenti\AVIV\OGREE\CodeBlocks\Ogre Tutorial\
--------------------------------------------------------------------------------
Switching to target: Release
mingw32-g++.exe   -Lc:\OgreSDK\lib -Lc:\OgreSDK\lib\opt\release  -LC:\Programmi\CodeBlocks\lib -LC:\Programmi\CodeBlocks\DevPacks\lib -o "OGRE sample.exe"     -Wl,--enable-runtime-pseudo-reloc  -lmingw32   -luser32 -lkernel32 -lgdi32 -lopengl32 -lOgreMain
C:\Programmi\CodeBlocks\lib/libmingw32.a(main.o):main.c:(.text+0x106): undefined reference to `[email protected]'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 
My project is console application.

Anyone can help me?

Thank you.

 

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Ogre + Codeblocks = problem with linker
« Reply #1 on: August 25, 2005, 09:34:32 pm »
I don't see any object files in that linker line  :shock:
Do a full rebuild and post here the compiler's log please...

Yiannis.
Be patient!
This bug will be fixed soon...

Offline EpSiLoN

  • Single posting newcomer
  • *
  • Posts: 4
Re: Ogre + Codeblocks = problem with linker
« Reply #2 on: August 25, 2005, 09:48:51 pm »
Ok, i have done a rebuild, this is the log

Project   : OGRE_Sample
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\Ugo\Documenti\AVIV\OGREE\CodeBlocks\Ogre Tutorial\
--------------------------------------------------------------------------------
Switching to target: Release
mingw32-g++.exe   -Lc:\OgreSDK\lib -Lc:\OgreSDK\lib\opt\release  -LC:\Programmi\CodeBlocks\lib -LC:\Programmi\CodeBlocks\DevPacks\lib -o "OGRE sample.exe"     -Wl,--enable-runtime-pseudo-reloc  -lmingw32   -luser32 -lkernel32 -lgdi32 -lopengl32 -lOgreMain
C:\Programmi\CodeBlocks\lib/libmingw32.a(main.o):main.c:(.text+0x106): undefined reference to `[email protected]'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 
It's the same. For accuracy, i have done New Projects->Ogre Application. The variable $OGRE_HOME is set up on c:\OgreSDK where there are my include and my lib.

Any idea?

Thank you.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4291
    • Code::Blocks IDE
Re: Ogre + Codeblocks = problem with linker
« Reply #3 on: August 25, 2005, 10:43:16 pm »
Click on "Compile->Rebuild" please.
Also, check in project properties, the "Release" target has any files associated with it?

Yiannis.
Be patient!
This bug will be fixed soon...

Offline EpSiLoN

  • Single posting newcomer
  • *
  • Posts: 4
Re: Ogre + Codeblocks = problem with linker
« Reply #4 on: August 25, 2005, 11:57:49 pm »
It's works!
The file main.c wasn't select! Strange, using the template ogre application the file main.c isn't it already select?

Thank you.

Offline EpSiLoN

  • Single posting newcomer
  • *
  • Posts: 4
Re: Ogre + Codeblocks = problem with linker
« Reply #5 on: August 26, 2005, 12:40:08 am »
I have seen better. In the Ogre Application Template the main.cpp file isn't select in Project/Targets Release options. While in the debug it is select.

One suggest: I think that an opengl template application is a good idea, but this template is only for windows. It is a good idea to add a template using glut library. It is a widespread libray to initialize opengl under all O.S.. This take advantage of release for windows and linux of codeblocks.

Thank you.