FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Setting up OpenGL
Goto page Previous  1, 2
 
Post new topic   Reply to topic     Forum Index -> General
View previous topic :: View next topic  
Author Message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Jun 27, 2004 4:33 pm    Post subject: Reply with quote

Ah ha, I found the link to Jan Kneppers updated implib. It adds additional symbol decoration for system libs. Might be necessary for use on later versions of opengl32.dll. You can find it HERE.

It basically adds on the "@..." symbols in order to avoid the necessity of manually setting up a def file to do the translation between symbol types. I don't know, though, whether it fixes the symbols completely for dmc or not, specifically the handling of the forward underscore "_". It's been awhile since I tried this.

Note again that making use of these tools are just for when you want to link with up to date system dlls. If you just need basic opengl functionality, you don't need to do all this. dmc has it all in place all ready with the provided opengl32.lib.
Back to top
View user's profile Send private message
Workaphobia



Joined: 24 Jun 2004
Posts: 17

PostPosted: Sun Jun 27, 2004 8:15 pm    Post subject: Reply with quote

Actually, the free DMC doesn't have opengl libraries. I believe it's only the CD version that has that, as Walter mentioned when I asked on the newsgroup. As for a linker compatible with both formats, I tried "alink", and when that didn't work I figured the others would be more trouble than theyâ?™re worth. But it's good to know I have other options here, so I suppose I'll download the one you mentioned and see if I can get that working. As for the implib, I'll try that too, just out of curiosity, and see if it all links fine. If both of these methods work, I'll scream and tear out my hair for finding such great alternatives such a short time after the problem was solved the hard way. Wink
_________________
"Nifty News Fifty: When news breaks, we give you the pieces."
Back to top
View user's profile Send private message
jcc7



Joined: 22 Feb 2004
Posts: 657
Location: Muskogee, OK, USA

PostPosted: Sun Jun 27, 2004 9:38 pm    Post subject: Reply with quote

JJR wrote:
I don't really understand why all this was necessary with dmc. dmc includes all the opengl implibs in the zip file to begin with. There should be no need to make a "def" file at all. Just comple with dmc and and link with the appropriate libs.
Ha! Now, that you mention it there is a opengl32.lib in my \DM\lib folder. It never even occurred to me to look there. (It has the same number of bytes as the opengl32.lib in the unDig repository, so it might be the same file.)

JJR wrote:
Note, I played with opengl and dmc a little over a year ago ...
That's more OpenGL experience than I have. Smile

JJR wrote:
Note again that making use of these tools are just for when you want to link with up to date system dlls. If you just need basic opengl functionality, you don't need to do all this. dmc has it all in place all ready with the provided opengl32.lib.
That's good to know.
Back to top
View user's profile Send private message AIM Address
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Jun 27, 2004 10:32 pm    Post subject: Reply with quote

Workaphobia wrote:
Actually, the free DMC doesn't have opengl libraries. I believe it's only the CD version that has that, as Walter mentioned when I asked on the newsgroup.


Oops! Sorry, I jumped to some wrong conclusions there. I didn't realize the free version didn't include what I consider a fundamental library within the package. Since this is the case you really do have only two options:

1) buy the CD (which is an excellent deal).

2) do it all the "hard" way, using the implib method and/or wlink.

#2 above actually can be advantageous if you get it all figured out because it means you download the most recent opengl spec header files (which also are not included in the free dmc version Sad ) and then implib your operating systems opengl32.dll (which is usually a newer version than what you would get with dmc anyway). So the tools I pointed too above may be your only sure way to get it all done. Of course, in the end, Justin may have provided you with the most effective solution all along.

Workaphobia wrote:
As for a linker compatible with both formats, I tried "alink", and when that didn't work I figured the others would be more trouble than theyâ?™re worth. But it's good to know I have other options here, so I suppose I'll download the one you mentioned and see if I can get that working. As for the implib, I'll try that too, just out of curiosity, and see if it all links fine. If both of these methods work, I'll scream and tear out my hair for finding such great alternatives such a short time after the problem was solved the hard way. Wink


I wouldn't recommend using any linker other than those suggested above.... ie wlink (openwatcom) and dmc link. It seems there's been very little compatibility due to subtle bugs within the others.

I haven't actually tried the wlink (openwatcom) with the digitalmars compiler, but others apparently have with success. The enourmous advantage of using it with 3rd party libraries is that openwatcom linker supports the COFF format (a popular object format that replaces the ancient OMF in most modern libraries); the dmc linker does not; this fact can be very frustrating when you try to get dmc working with other libraries. I may actually give it a try myself and see how far I get with opengl. Come to think of it, it's been awhile, and I want to see what I can do. I'll give it a go starting from scratch and see how far I get (that is, I won't use the opengl32.lib provided with my dmc; I'll implib my own from winxp). I'll keep you posted.

Later,

John
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Jun 27, 2004 10:37 pm    Post subject: Reply with quote

jcc7 wrote:
Ha! Now, that you mention it there is a opengl32.lib in my \DM\lib folder. It never even occurred to me to look there. (It has the same number of bytes as the opengl32.lib in the unDig repository, so it might be the same file.)


It probably is the same file. If not, it's easy enough to make an implib from any opengl32.dll and redistribute it (if that's allowed). It may be the same one, I don't know. I actually remember playing with the one that came with MingW. I tried to convert it into an library for dmc using coff2omf, I beleive. I don't think I succeeded. Mingw uses a slightly different format I think (but it did seem to be a more recent version: much larger file size).
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Mon Jun 28, 2004 1:17 am    Post subject: Reply with quote

My initial attempts to use Jan Kneppers implib have been unsuccessful despite following his documentation carefully.

I using the MS WinXP opengl32.dll found in \windows\system32. When I do this:

implib /system /v /suffix -Is:\dm\include\gl opengl32.lib opengl32.dll

It generates opengl32.lib, but only one that contains symbols prefixed with the underscore "_". It doesn't add the suffix "@.." also like it's supposed to. I have no clue why. But no symbols will be recognized until it does. I can see this being a frustrating issue for those trying to access system dll's (for myself, I think being capable of updating the old opengl32.lib from the CD would be nice). I'll probably post to the C++ newsgroup to see if there's an answer to why Jan's implib doesn't do what it's supposed to. Who knows, maybe Jan will answer himself!

Sorry, I guess it wasn't as easy as I thought... grrr. May as well stick to what Justin helped you with. Setting the opengl32.def file manually will definitely force things to work.

Later,

John
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Mon Jun 28, 2004 5:54 am    Post subject: Reply with quote

JJR wrote:
your operating systems opengl32.dll (which is usually a newer version than what you would get with dmc anyway).


Just to clear the air a bit, there is no 'newer version' of Opengl32.dll. Microsoft has not updated it in years, and by default it only provided 1.1 functionality. Hence, when trying to get at features beyond 1.1 on Windows as provided in the graphics card drivers, you have to load the functions you want manually via wglGetProcAddress. A real PITA.

But the worm may be turning. According to a recent Gamasutra article, MS will begin supporting Opengl again with the release of Windows XP64 this summer. Whether that means they'll add 1.2+ support to the stock DLL I don't know, but one can hope.
Back to top
View user's profile Send private message Send e-mail
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Mon Jun 28, 2004 9:13 am    Post subject: Reply with quote

Aldacron,

Eep! Thanks for clarifying that! I should have known better. I'm glad you brought that up before I made too much more of a fool of myself. Shocked

Embarassed

Later,

John
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> General All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group