delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/13/05:56:50

From: abroomsg AT cix DOT co DOT uk (Andy Broomsgove)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: RHIDE error message
Date: Tue, 13 Oct 1998 10:57 +0100 (BST)
Organization: CIX - Compulink Information eXchange
Message-ID: <memo.19981013105715.17381B@abroomsg.compulink.co.uk>
References: <3622691E DOT 89B94A5C AT cartsys DOT com>
NNTP-Posting-Host: dyna27-09.compulink.co.uk
Lines: 262
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <3622691E DOT 89B94A5C AT cartsys DOT com>, nate AT cartsys DOT com (Nate 
Eldredge) wrote:

> Andy Broomsgove wrote:
> 
> > Now I can't see any syntax errors in what I've done and I certainly
> > haven't written more than one main function so can anybody tell me
> > anything about this?
> 
> Post the source, please, as well as an RHIDE bug report which gives many
> useful details.


The full source is a bit long to post, but appended is a slimmed down 
version (which still exhibits the same problem). The complex file 
structure is due to the fact that (as I think I said before) this is the 
start of writing version 2 of a program which is used to control 
theatrical lighting. Version 1 runs to some 12,000 lines of code, Version 
2 is estimated at 17,000 - 20,000 lines and I am presently proposing to 
use RHIDE as the development environment for it. The program concerned is 
a dos based program and developing version 1 in a windows programming 
environment was a real PITA. 




>  
> > Or is it just that RHIDE is full of bugs and nobody uses it?
> 
> No, it's widely used, and it interfaces to the same compiler everybody
> else uses.
> -- 

Ok fine. I realise it uses the same compiler. I am moving to djgpp because 
someone I know recommended it, but I knew nothing of RHIDE beyond the fact 
that it was there to download. 

A possible explanation for the problems I am experiencing is some error in 
the way RHIDE creates/maintains a project (ie it might be trying to link 
andylx.c twice, hence creating the "mutiple definition of main" error). 

If it's widely used then it's more likely that I have done something wrong 
in the way I have set the project up or arranged the files.

I am sure you are aware that the documentation for RHIDE is almost non 
existent. 



> 
> Nate Eldredge
> nate AT cartsys DOT com
> 

Thanks Nate, any light you can shed is welcome.

Andy


Header for main file in project, andylx.h
-----------------------------------------

#ifndef __andylx_h
#define __andylx_h



/*compiler includes*/

#include <string.h>
#include <stdlib.h>



/*function definitions*/

void screen_struct_inits(void);

#endif


Main file for project
---------------------

#include "andylx.h"


main()
{
screen_struct_inits();
return 0;
}


Header for another file - defines.h
-----------------------------------

#ifndef __defines_h
#define __defines_h
/* define structure for channel numbers display*/

struct a1 {
int row;
int col;
char disp[4];
};


/*define structure for channel levels disp*/

struct a2 {
int row;
int col;
};

void chan_to_disp(char*, int);


#endif


Main file for this header - defines.c
-------------------------------------


#include "defines.h"

/*allocate space for it screen display tables*/

struct a1 fixed_disp[125];
struct a2 chan_disp[125];


Another file in the project - init.c
------------------------------------

#include "defines.h"

extern struct a1 fixed_disp[];
extern struct a2 chan_disp[];


void screen_struct_inits(void)
{
int i;
char disp_result[4];


         chan_to_disp(disp_result, i);
/*there is actually a lot more processing here, but it errors without*/
         return;
}


void chan_to_disp(char *disp,int i)
{
/*again there is actually a lot more processing here*/
return;

}


And finally the bug report as requested
---------------------------------------

This is a bug report for RHIDE Version 1.4 (Sep 30 1997 23:06:59)
I am running MS-DOS 7.10 (Windows 95)

Important environment variables:
PATH=C:\MOUSE;C:\DJGPP\BIN;C:\WINDOWS;C:\WINDOWS\COMMAND
DJGPP=C:\DJGPP\DJGPP.ENV
LFN=n
INFOPATH=c:/djgpp/info;c:/djgpp/gnu/emacs/info
LOCALEDIR=
LANGUAGE=
SHELL=
COMSPEC=C:\WINDOWS\COMMAND.COM
DJSYSFLAGS=

Here is the output from a sample compilation and link for C
executing: 
echo "int main(){return 0;}" | redir -eo gcc -Xlinker -v -Wa,-v -v -o 
/dev/null -x c -
Reading specs from c:/djgpp/lib/specs
gcc version 2.8.1
 c:/djgpp/lib/gcc-lib/djgpp\2.81\cpp.exe -lang-c -v -undef -D__GNUC__=2 
-D__GNUC_MINOR__=8 -Dunix -Di386 -DGO32 -DMSDOS -DDJGPP=2 -DDJGPP_MINOR=1 
-D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 
-D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 
-D__DJGPP_MINOR=1 - c:/djgpp/tmp/RHbaaaaa\ccaqb3ca
GNU CPP version 2.8.1 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 c:/djgpp/include
 c:/djgpp/lib/gcc-lib/djgpp/2.81/include
 c:/djgpp/include
End of search list.
 c:/djgpp/lib/gcc-lib/djgpp\2.81\cc1.exe c:/djgpp/tmp/RHbaaaaa\ccaqb3ca 
-quiet -dumpbase -.c -version -o c:/djgpp/tmp/RHbaaaaa\ccbqb3ca
GNU C version 2.8.1 (djgpp) compiled by GNU C version 2.8.1.
 c:/djgpp/bin/as.exe -v -o c:/djgpp/tmp/RHbaaaaa\cccqb3ca 
c:/djgpp/tmp/RHbaaaaa\ccbqb3ca
GNU assembler version 2.8.1 (i386-pc-msdosdjgpp)
 c:/djgpp/bin/ld.exe -o /dev/null c:/djgpp/lib/crt0.o -Lc:/djgpp/lib 
-Lc:/djgpp/lib/gcc-lib/djgpp\2.81 -Lc:/djgpp/bin -Lc:/djgpp/lib -v 
c:/djgpp/tmp/RHbaaaaa\cccqb3ca -Tdjgpp.djl -lgcc -lc -lgcc
GNU ld version 2.8.1 (with BFD 2.8.1)
 c:/djgpp/bin/stubify.exe -v /dev/null
Warning: input file is not COFF or stubbed COFF
.exe: No such file or directory (ENOENT)
stubify for djgpp V2.X executables, Copyright (C) 1995 DJ Delorie

End of the sample

Here is the output from a sample compilation and link for C++
executing: 
echo "int main(){return 0;}" | redir -eo gcc -Xlinker -v -Wa,-v -v -o 
/dev/null -x c++ -
Reading specs from c:/djgpp/lib/specs
gcc version 2.8.1
 c:/djgpp/lib/gcc-lib/djgpp\2.81\cpp.exe -lang-c++ -v -undef -D__GNUC__=2 
-D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=8 -Dunix -Di386 -DGO32 -DMSDOS 
-DDJGPP=2 -DDJGPP_MINOR=1 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ 
-D__DJGPP__=2 -D__DJGPP_MINOR__=1 -D__unix -D__i386 -D__GO32 -D__MSDOS 
-D__DJGPP=2 -D__DJGPP_MINOR=1 -D__EXCEPTIONS - 
c:/djgpp/tmp/RHbaaaaa\ccaqe3ca
GNU CPP version 2.8.1 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 c:/djgpp/lang/cxx
 c:/djgpp/include
 c:/djgpp/lang/cxx
 c:/djgpp/lib/gcc-lib/djgpp/2.81/include
 c:/djgpp/include
End of search list.
 c:/djgpp/lib/gcc-lib/djgpp\2.81\cc1plus.exe 
c:/djgpp/tmp/RHbaaaaa\ccaqe3ca -quiet -dumpbase -.cc -version -o 
c:/djgpp/tmp/RHbaaaaa\ccbqe3ca
GNU C++ version 2.8.1 (djgpp) compiled by GNU C version 2.8.1.
 c:/djgpp/bin/as.exe -v -o c:/djgpp/tmp/RHbaaaaa\cccqe3ca 
c:/djgpp/tmp/RHbaaaaa\ccbqe3ca
GNU assembler version 2.8.1 (i386-pc-msdosdjgpp)
 c:/djgpp/bin/ld.exe -o /dev/null c:/djgpp/lib/crt0.o -Lc:/djgpp/lib 
-Lc:/djgpp/lib/gcc-lib/djgpp\2.81 -Lc:/djgpp/bin -Lc:/djgpp/lib -v 
c:/djgpp/tmp/RHbaaaaa\cccqe3ca -Tdjgpp.djl -lgcc -lc -lgcc
GNU ld version 2.8.1 (with BFD 2.8.1)
 c:/djgpp/bin/stubify.exe -v /dev/null
Warning: input file is not COFF or stubbed COFF
.exe: No such file or directory (ENOENT)
stubify for djgpp V2.X executables, Copyright (C) 1995 DJ Delorie

End of the sample



My problem is the following:
============================





- Raw text -


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