public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* About using mingw32 with RSXIDE and PFE32
@ 1998-10-21  9:13 Sjoerd Bakker
  1998-10-22 17:06 ` IDEs for mingw32 [Re: About using mingw32 with RSXIDE and PFE32] Mumit Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Sjoerd Bakker @ 1998-10-21  9:13 UTC (permalink / raw)
  To: gnu-win32

I know that using an IDE for developing gnu-win32 code is not a very
populair idea with some of you Unix(-alike)-people. So I hope you will just
delete this message without getting angry.


For those of you who *are* interested: I'm currently using mingw32 (JJH's
version) with RSXNT's IDE which is included in rsxnt141.zip (2.2 Mb) and
PFE32 (freeware Programmer's File Editor) as an editor. This is a very
workable IDE-environment for developing and porting under Windows. I have
made some adaptions:

1. I use Microsofts resource compiler RC instead of windres. RC is included
in the platform base SDK and downloadable from Microsoft. The pathname of
RC's include directory shoud be specified with double backslashes in
RSXIDES's .ini-file, e.g. RC=rc /r /i C:\\MINGW32\\INCLUDE %f.
 
2. For linking .res - and .o files I use rsrc.exe, also from RSXNT. RSXIDE
is automatically configured to work with rsrc.

3. I've hex-edited RSXIDE, so that it now compiles with either no (RSXNT-)
standard-options for console programs, or -mwindows for 'real' windows
coding. This is an easy edit... just replacing -Zwin32 with zeros and
-Zcrtdll=crtrsxnt with -mwindows<space><00>. Now the first two options of
"Use Runtime libraries" from the menu Opions::TargetSwitches::General will
generate no options and -mwindows in the makefile respectively.
 
4. RSXIDE is configured to work with a number of editors and PFE32 is one
of them. By double-clicking on gcc-output you can make PFE go to the exact
line in which the error is located. For cooperation between RSXIDE and
PFE32 when invoking PFE to edit header-files, the (mingw32-) environment
variables that point to include-directories should be changed from, for
instance, c:\mingw32\include to \mingw32\include. Apparently RSXNT sees
colons as information-seperators, and it treats the first item of a line as
the pathname and the second as the line-number to which PFE should go.
Therefore, output like c:\mingw32\include\glu.h:23:warning:etc. will not be
interpreted correctly by RSXIDE. The other files of a project will normally
be in the 'current directory', so RSXIDE doesn't use their full pathname. 

5. I wrote a little program to remove duplicate backslashes in pathnames
that cc1plus (cc1 does not do this) outputs to stderr. PFE can't handle
these 'C-style' pathnames. For C++ compiling I call this program instead of
gcc itself and it then calls gcc. Unfortunately a direct _popen doesn't
seem to work when calling gcc (although it does work well with many other
programs), so I use a temporary file instead. I copied this method from
D.J. Delorie's redir.c.

The following source code of slash.c works, but it does no error checking.
It is also not very safe from other viewpoints (e.g. no fixed location for
the temporary file which sometimes results in failed deletion) but I won't
go into that. I've included this code mainly to show how a slash-filter
*could* be written ;)

I hope that these suggestions for use of and changes to the 'package'
mingw32, RSXIDE and PFE32 can be of use to someone. I'm not 'supporting'
these adaptions and I'm also not liable for their consequences or
correctness: use them at your own risk. If you want to react and want a
quick(er) reply, please also send a copy to my e-mail address because I'm
not subscribed to this mailinglist. 


Sjoerd Bakker
sjoerd.s.bakker@tip.nl

-------------------------- slash.c -------------------------

#include <stdio.h>
#include <stdlib.h>
#include <process.h>
#include <fcntl.h>

int main(int argc, char **argv)
{
char *temp_name = "slash.tmp";
int gcc, c, prev_c = 'a';

close (2); 
/* close stderr */

open (temp_name, O_RDWR | O_CREAT | O_TRUNC, 0666);
/* temp-file should be assigned handle 2 */

gcc = spawnvp (P_WAIT, "gcc", argv);

lseek (2, 0L, SEEK_SET);
while (read(2, &c, 1) > 0)
  { c &= 0xFF;
    if (! (c == '\\' && prev_c == '\\'))
        putchar (c);
    prev_c = c;
  }

close (2);
remove (temp_name);

return gcc;
}

-----------------------------------------------------------   

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 2+ messages in thread

* IDEs for mingw32 [Re: About using mingw32 with RSXIDE and PFE32]
  1998-10-21  9:13 About using mingw32 with RSXIDE and PFE32 Sjoerd Bakker
@ 1998-10-22 17:06 ` Mumit Khan
  0 siblings, 0 replies; 2+ messages in thread
From: Mumit Khan @ 1998-10-22 17:06 UTC (permalink / raw)
  To: Sjoerd Bakker; +Cc: gnu-win32

Sjoerd Bakker <sjoerd.s.bakker@tip.nl> writes:
> I know that using an IDE for developing gnu-win32 code is not a very
> populair idea with some of you Unix(-alike)-people. So I hope you will just
> delete this message without getting angry.

[ useful discussion and description of using RSXNT's IDE ]

Nobody will (should) get angry, since this is an important issue. The
bad news is that writing an IDE takes a lot of work, but the good news
is that there at least two independent on-going projects for mingw32 
(and which should be usable for cygwin as well with some minor tweaks): 
  
  1. Dr. Wampler's V-based IDE called "vide" 
       http://www.objectcentral.com/
  
  2. Al Stevens' of Dr Dobbs MFC-based IDE Quincy99 
       http://www.midifitz.com/alstevens/quincy99/

Both are free and provide a very good starting point for those who want
to help out. Hint hint ...

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-10-22 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-21  9:13 About using mingw32 with RSXIDE and PFE32 Sjoerd Bakker
1998-10-22 17:06 ` IDEs for mingw32 [Re: About using mingw32 with RSXIDE and PFE32] Mumit Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).