PR without winutil

Started by
6 comments, last by kill 23 years, 10 months ago
Hi. I''m trying to initialize PR, but I don''t want to use the utilities class that comes with it. When I compile my code, I get a bunch of linking errors(unresolved externals). As far as I understand PR expects me to define a couple of functions, and to declare some variables. Is there a way to avoid this?
Advertisement
Are you compiling your own code, or have you adapted any examples (such as the Land demo)? What externals are being reported as missing? You''ve included the necessary PR, DirectX and Windows libraries, right?
Creativity is a bloody nuisance and an evil curse that will see to it that you die from stress and alcohol abuse at a very early age, that you piss off all your friends, break appointments, show up late, and have this strange bohemian urge (you know that decadent laid-back pimp-style way of life). The truly creative people I know all live lousy lives, never have time to see you, don't take care of themselves properly, have weird tastes in women and behave badly. They don't wash and they eat disgusting stuff, they are mentally unstable and are absolutely brilliant. (k10k)
Compiling my own code. I''ve included everything. I''m at work right now, so I can''t really say for sure what''s reported missing, but it was something like _hMainWnd, movex, movey(or some other functions declared in winutil that handle the mouse). I don''t include winutil in the project, so all this stuff is undefined. My guess is, it''s declared somewhere in PR, and I can''t figure out where.
I just encountered this problem. My solution was to declare all the variables it required and create nonfunctional stub versions of the missing functions. You should be able to figure out the failure return values of the functions that return a value from winutils.c. That works for me but may be a problem with certain (input related?) functions.

I suggest you try doing that, unless you need PR_editstring and a few others.



Regards,
Ralph Potter
ralph.potter@digital-magi.com, http://www.digital-magi.com

Regards,Ralph Potterralph.potter@digital-magi.com, http://www.digital-magi.com
Yeah, I thought about that too. But this is just a short cut, it makes the code work, but it''s not a production type of solution. This doesn''t get to the bottom of things(which I want to do, to be sure the code won''t behave unpredictably).
If you want production quality code, don''t remove vital parts of the engine

You can totally change the device selection dialog, remove it, store the setup in a configuration file or registry so it only appears once, etc.

I don''t understand why people are trying to remove winutil.c when it has all of the important Windows initialization routines for input and window creation. You need all of it.

I have made a version with stub functions, but that was for a screensaver that didn''t require any input.

Chris
Author of Power Render (http:/www.powerrender.com)
Chris, the reason I am trying to remove the file, is because I want to set up my own windows initialization routines, and my own game loop. I am working with C++, and I really prefer OOP, so I'm wrapping PR into C++ classes, and I really want my game code to look clean(from my point of view). I don't find winutil to be the cleanest file I've ever seen, and I don't want to make changes to it to accomodate me.

What I'll do, is that I'll probably fully rewrite this file...


Edited by - kill on June 15, 2000 9:34:51 AM
Thats pretty much exactly the reason I had to do it. If anyone finds a better solution to this problem I'd be very interested to know. For the time being I'm left with a single file tucked into my project that I try not to look at if I can help it, 'cos it bugs me to know I can't get rid of those references. Unfortunately IIRC at least one of them came out of PR.lib file which I can't really do much about.

Regards,
Ralph Potter
ralph.potter@digital-magi.com, http://www.digital-magi.com

Edited by - digital-magi on June 15, 2000 9:48:15 AM
Regards,Ralph Potterralph.potter@digital-magi.com, http://www.digital-magi.com

This topic is closed to new replies.

Advertisement