Mail Archives: djgpp/1997/09/10/09:06:43
The NiBBLeR wrote:
>
> Hello,
>
> I'm programming a 3d-engine in djgpp at the moment.
> But now I found something ratherly strange:
>
> when I have the DJGPP-environment-variable on:
> SET DJGPP=C:\DJGPP\DJGPP.ENV
> my engine works OK !!!
>
> but when I want to run this engine (I include cwsdpmi.exe for the dpmi)
> on another computer without djgpp, I get a general protection fault ????
> (btw I tried all kind of different systems, and it only works when djgpp
> is on there... )
>
> and I would like to spread my engine without the need of WHOLE DJGPP...
>
> Does somebody know how this is possible, and what the causes may be...
> ???
> THANK YOU VERY MUCH IS ADVANCE!!!
>
Just a wild guess:
You load some graphics font, screen driver or whatever
from somewhere under /djgpp. And the graphics code searches
under ${DJGPP}/lib or any variable listed in djgpp.env.
If so, the cure will be
-distribute the exe, cwsdpmi & the fonts
-at run time, figure out the location of the executable
This might be tricky, but checking argv[0] usually suffices..
- Then issue in the program a
setenv("WHAT_EVER_VAR_IT_NEEDS", path_to_exe, 0);
This will overwrite WHAT_EVER_VAR_IT_NEEDS only if it
is not yet set.
- Hope for the best ;-)
--
Ciao
Tom
*************************************************************
* Thomas Demmer *
* Lehrstuhl fuer Stroemungsmechanik *
* Ruhr-Uni-Bochum *
* Universitaetsstr. 150 *
* D-44780 Bochum *
* Tel: +49 234 700 6434 *
* Fax: +49 234 709 4162 *
* http://www.lstm.ruhr-uni-bochum.de/~demmer *
*************************************************************
- Raw text -