From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: environment djggp: ALL OK, else NOT :( Date: Wed, 10 Sep 1997 13:55:19 +0200 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 52 Message-ID: <34168AA7.79EB9262@LSTM.Ruhr-UNI-Bochum.De> References: <341575EC DOT 6E18 AT pop DOT telebyte DOT nl> NNTP-Posting-Host: c64.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit CC: bws AT telebyte DOT nl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 * *************************************************************