From: axlq AT unicorn DOT us DOT com (axlq.comp.os.msdos.djgpp) Newsgroups: comp.os.msdos.djgpp Subject: Adventures Compiling RHIDE on FreeBSD Date: 26 Jan 2000 19:41:00 GMT Organization: a2i network Lines: 83 Message-ID: <86nikc$dqr$1@samba.rahul.net> NNTP-Posting-Host: yellow.rahul.net NNTP-Posting-User: unicorn X-Newsreader: trn 4.0-test70 (17 January 1999) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com After a bout of frustration with gdb (having to step through too many iterations of a long loop and examine variables each time) I decided to find out if I could compile that wonderful RHIDE under FreeBSD. My service provider (rahul.net) gives everybody shell accounts in both SunOS4 and FreeBSD, which I use for development work. The FreeBSD side has the GNU C++ stuff installed, and the FreeBSD servers are faster, so that's what I (and most other customers) are using more and more. I have longed for something like RHIDE in FreeBSD. I develop my software on my DOS box with RHIDE and then port it to the FreeBSD server. Often, software that works perfectly under DOS will fail to work in some mysterious way on another OS, even using the same compiler. And for some applications gdb simply isn't adequate, nice as it is. So... my porting attempt failed. I have sent the following to Robert Hoehne, but thought that anybody wanting to attempt it might benefit from the expierience. Here, then, in the order things happened up to the point where I got stuck.... After downloading the latest linux source (1.4.7), I unpack it, type 'make' at the command prompt and discover: 1. The gcc option -fno-exceptions (in the *.mak files) doesn't seem to exist in the FreeBSD version of gcc. I suggest moving this flag into the RHIDE_OS variable. I deleted that flag from the .mak files for now (libide/libide.mak, libide/names/names.mak, and libide/streams/streams.mak). Continuing with 'make' I find.... 2. tvision/include/intl.h tries to include a file called which doesn't exist. I don't know what this is; it isn't in your rhide directory tree, nor in djgpp under DOS. Can you tell me what's in here that's important? Does it possibly contain a prototype to gettext()? I notice that gettext() isn't prototyped anywhere that I can see, which results in some compiler warnings later. In any case, gettext() isn't a library function under FreeBSD. Is it your own function? OK... I commented out the #include in tvision/include/intl.h for now. I execute the 'make' command again, and a whole bunch of modules compile until... 3. The -Werrer gcc option causes make to abort on libide/tflagent.cc. Here's a small sample of the errors: tflagent.cc:46: warning: implicit declaration of function `int gettext(...)' [where is this prototyped?] tflagent.cc:48: warning: passing `int' to argument 1 of `ValidInputBox(const char *, const char *, char *, int, TValidator *)' lacks a cast [and lots more warnings about this function call in other places] tflagent.cc:66: warning: passing `int' to argument 2 of `strcpy(char *, const ch ar *)' lacks a cast tflagent.cc:69: warning: passing `int' to argument 2 of `strcat(char *, const char *)' lacks a cast All right. Let me remove the -Werror option for now. I removed it from libide/libide.mak. I type 'make' again, several more modules compile without warnings (except for tflagent.cc), until... 4. In libide/tidefile.cc, we have two of the following errors (not warnings): tidefile.cc:99: too many arguments for function `short unsigned int messageBox(const char *, short unsigned int)' I notice that tvision/include/msgbox.h has two prototypes for messageBox(), and there are two versions of this function in tvision/msgbox.cc. I am unsure what to do about this. The compiler should handle such function overloading. OK, to get around this I changed the name of the messageBox() function with variable arguments to messageBoxv(). I type 'make' again and all those modules that call it now compile just fine. 5. However, I finally got stuck. libhrgdb/librhgdb.mak has a dependency on libgdb/libgdb.h which doesn't exist in the linux source archive. Help! -- ,|___ Alex Matulich -- axlq AT unicorn DOT us DOT com (spamtrap; reply with // +__> Director of Research and Development valid usenet headers) // \ //___) Unicorn Research Corporation -- http://unicorn.us.com