Mail Archives: djgpp/2002/10/10/09:45:04
MikeC (my DOT address AT end DOT of DOT post) wrote:
: I have recently loaded DJGPP onto a Win2K platform. I use RHIDE, and
: everything is working fine - as long as it stays on my PC! If I send a
: compiled program to somebody else with Win2K, when they attempt to execute
: the program, a DOS box opens on their screen them immediately closes again -
: and that's it. Show over!
Ask them to open the DOS box themself and start your program in it. Do
they get a crash message in that case?
: A colleague of mine also uses DJGPP, but he doesn't use RHIDE - he uses some
: other editor, then compiles with the line :
: gcc -Wall -O2 -o myprog.exe myprog.c
: and his compiled programs work on other Win2K machines.
When he's compiling the same program as you?
: RHIDE on my machine executes
: gcc -g -c myprog.c -o myprog.o
: then
: gcc -o myprog.exe myprog.o
: I have messed about with the settings for the compile and linker options a
: bit, but I can't make it compile a program that somebody else can use. If I
: come out of RHIDE and execute the line that my colleague uses, of course, it
: works, but what am I doing wrong in RHIDE?
As far as I can see: nothing that should make your programs crash.
-O2 is optimisation level. At least -O should really be used.
-g is debug information.
-Wall turns on "good" (in the eyes of gcc developers) warnings.
The presence or absence of these options should not make any
difference _unless_ you have bugs in your code which goes unnoticed in
one optimisation level but not in another (-O switch). (And usually
those bugs appear when optimisation is cranked _up_, not down.)
: Any help or pointers appreciated.
Add "-O2" to rhide compile options to get the equivalent optimisation
level as your colleague.
Right,
MartinS
- Raw text -