www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/18/02:28:51

To: "Allens" <allen DOT asjp AT cableol DOT co DOT uk>
Date: Thu, 17 Sep 1998 23:28:12 -0700
From: "Doug Gale" <dgale AT mailexcite DOT com>
Message-ID: <DBLBIHFEABCFAAAA@mailexcite.com>
Mime-Version: 1.0
Cc: djgpp AT delorie DOT com
Subject: Re: DJGPP and windows?
Organization: MailExcite (http://www.mailexcite.com:80)

>> Hmmm. Bashing RSXNTDJ a teensy weensy bit? I got it, and so far have built
>> Winsock apps (FTP download, SMTP mail send, POP3 mail receive), OpenGL program
>> (I've learned enough to load models, control rendering detail, and fly around
>> the scene, and with 3dfx OpenGL drivers, it would scream out polygons!), a
>> couple of half-done tray utilities... There were two parts that weren't easy
>> though, I will admit. Getting the tools and build environment from microsoft,
>> 12MB + 5MB of downloading I think, but allowed me to use the real headers (a
>> patch is included that patches the headers because of a few declaration styles
>> differ between MS C and GNU C). Since I have installed it, I can switch back
>> and forth between DOS code and Win32 code by swapping ld.exe and djgpp.env (I
>> do it with a batch file).
>> 
>> Also, you don't HAVE to make true "windows" programs, you can call winsock, or
>> opengl, or almost any API from what they call "console" win32 apps. It looks
>> like a DOS window, but it is true Win32 code. You can still use printf(),
>> scanf(), and all that fun standard C stuff without going nuts learning about
>> messages, window handles, DC contexts, RegisterClass(), BeginPaint(), BitBlts,
>> and all that other fun GDI and window class stuff. I'm pretty sure you can call
>> DirectDraw (Direct3D, DirectEverythingElse) from a console app too. (Accessing
>> COM objects (like DirectX) does require some singing and dancing in your
>> program to initialize everything, so, be warned)
>> 
>> Oh yeah...I use rsxntdj with gcc 2.8.1 and haven't noticed the
>> 'incompatibility' you are talking about.
>> 
>> Doug Gale
>
>Have you modified the direcotory structure or the specs file?  It 
>doesn't work for me and at least 4 other people who have tried it.  
>Is c++ working with it, because if so, I wan't to know how...

Yes, I did modify the specs file. The problem you were probably having was that the linker didn't know which set of libraries to use. In the lib directory, there are two subdirectories: st and mt. These two directories hold the Single Thread and Multi Thread libraries. It is necessary to have two libraries as multithread libraries have added code for semaphores for non-reentrant functions, has more reentrant functions, and is bigger. I modified the specs file to add parameters that include either one library set or the other, depending on whether or not I specify -Zmt. I remember when I tried compiling the "hello world" example, it had link errors (didn't find libc or something like that). To fix that, I manually included that directory (in that case, r:/rsxntdj/lib/st) on the command line (using -Lr:/rsxntdj/lib/st). The part of the specs file you need to modify is where it says "*link". I have pasted the actual excerpt below:


*link:
%{Zwin32: -Lr:/rsxntdj/lib/all} %{Zmt: -Lr:/rsxntdj/lib/mt} %{!Zmt: -Lr:/rsxntdj/lib/st}

(In case of word wrap, starting at the %, the rest is all one line)

My rsxntdj is stored in r:/rsxntdj. Replace accordingly.



Free web-based email, Forever, From anywhere!
http://www.mailexcite.com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019