Archived

This topic is now archived and is closed to further replies.

ripper079

Can´t get glut work with mine BORLAND compiler

Recommended Posts

ripper079    122
I´ve been having this trouble for a long time and still I can´t fix it. I´ve downloaded every glut.lib and glut.h file that exits on the net (feels that way). When I compile my code it doesnt generate any errors, but when I try to run it, the compiler complains "glut32.lib contains invalid OMF record, type 0x21". I´ve tried to use implib but still getting the same problem. Im out of options now and don´t know what to do next. Does anybody have any suggestions or maybe somebody has had the same problem??? Need serious help. Thx in advance

Share this post


Link to post
Share on other sites
Cirian    122
Taken from www.bcbdev.com

If the LIB file is a static library instead of an import library (static libraries contain real code, import libraries are just stubs for DLLs), then the situation becomes more convoluted. You cannot link MSVC static libraries with your BCB project. You can''t easily convert the library from COFF format to OMF either. Borland''s COFF2OMF tool only works on import libraries. The only clean solution is to use MSVC to create a DLL or a COM object that wraps the static library. Create a DLL with MSVC that exports a wrapper function for each routine in the static library. If the static library contains C++ classes, then you could be in for a rough ride. Consult the article at http://www.bcbdev.com/articles/vcdll2.htm. It describes how to wrap a C++ DLL with a Borland compatible DLL. Static C++ libraries are not quite the same, but they are very similiar. The techniques involved are practically the same.

Share this post


Link to post
Share on other sites
genovov    122
i seem to recall another utility that comes with the borland compiler that creates a import library directly from a dll. i believe i used this utility to create a .lib i could use to compile an app with glut. i forget the name of the binary utility, but it's in the same directory as implib.


Edited by - genovov on December 20, 2001 9:49:52 AM

Share this post


Link to post
Share on other sites
Dredge-Master    175
All that you have to do is run the program implib.exe from console too read in the DLL files and it will create the correct LIB (borland w32 library) for you.

If I get around to it, I will convert it (haven''t had to use glut for two years) and upload it if you can''t get it done yourself.


PS - I am not sure if implib comes with the free distribution of bcc32 5.5



Beer - the love catalyst
manuelb    152
I had the same problem.. and my advice is
Forgot Borland c++. Begin to use Dev C++
It has native opengl libs and it is freeware.
The editor interface is very better than borland c++.
I can''t belive it''s freeware.
The site where you can get it is:
http://www.bloodshed.net/

--------------------------
Rory Gallagher blues will never die.
---------------------------

Share this post


Link to post
Share on other sites
Dredge-Master    175
have to say something to point out how much I think that that would be a very very very dumb decision to make.


who cares how darn hard something is to use (btw, borland does have opengl native to it, type #include if you want to use it), just remember that when you release the program, you want it bug free and fast.



Beer - the love catalyst
good ol'' homepage

Share this post


Link to post
Share on other sites
Dredge-Master    175
can''t be bothered uploading the files, so instead do this


1
make a directory, copy glut.h into the folder (and glu.h and gl.h if you need to or anything else) You DO NOT need the libraries (pointless).

2
Next step. Copy into the folder the files glut32.dll (and if you need them, glu32.dll, opengl32.dll and so on).

3
Type
implib glut32 glut32.dll
(or implib glut32.lib glut32.dll - not necessary though)

and it will create glut32.lib for you

do the same for any other libraries you need to import




Beer - the love catalyst
good ol'' homepage

Share this post


Link to post
Share on other sites