Author Topic: Prolem with building OpenGL example  (Read 4078 times)

Zdravko

  • Guest
Prolem with building OpenGL example
« on: March 26, 2007, 07:22:09 pm »
I use 3758 version with Borland 5.5 compiler. I try the sample code in OpenGl project. It compiles OK. But then the linker says:
Quote
-------------- Build: Release in gltest5 ---------------
[100.0%] Linking executable: bin\Release\gltest5.exe
Error: 'C:\BORLAND\BCC55\LIB\OPENGL32.LIB' contains invalid OMF record, type 0x21 (possibly COFF)
Process terminated with status 2 (0 minutes, 0 seconds)
0 errors, 0 warnings
Now, what to do?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Prolem with building OpenGL example
« Reply #1 on: March 26, 2007, 08:21:54 pm »
You're probably linking against a VC compiled static library. Don't copy opengl32.lib from platform SDK or VC installation directory to BCC installation folder. They are incompatible with each other.

I've made couple of changes to the OpenGL wizard which will fix linking problem when BCC is used. Here is the log from my test sample when compiled with BCC.

Quote
-------------- Build: Debug in TestGL ---------------
[ 50.0%] Compiling: main.c
main.c:
Warning W8057 main.c 110: Parameter 'hPrevInstance' is never used in function __stdcall WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int)
Warning W8057 main.c 110: Parameter 'lpCmdLine' is never used in function __stdcall WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int)
[100.0%] Linking executable: bin\Debug\TestGL.exe
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 2 warnings

Please wait for the next nightly release. Your problem should get solved. :)

Regards,

Biplab
Be a part of the solution, not a part of the problem.

Zdravko

  • Guest
Re: Prolem with building OpenGL example
« Reply #2 on: March 28, 2007, 10:45:25 pm »
Nope, I get the same error with version 3788. Why?