Mail Archives: djgpp/1995/02/16/12:37:16
>
> Dear Programmers,
> Again I would like to ask you for advice.
>
[...stuff deleted...]
> D:\SRC\CAPPER\FIVE>cc1plus cube.cc
This is *not* the correct way to compile c++ with djgpp: you should
write 'gcc -c cube.cc' instead for compilation into cube.o, and then
'gcc -o cube cube.o {some other *.o ones, I guess} -lgpp' or something
roughly like that. It's exactly like on any other U*IX-ish machine, just
say 'gcc' instead of 'cc', and remember to add '-lgpp' when linking it.
> cube.cc:1: parse error before `/'
> cube.cc:3: undefined or invalid # directive
> int main()General Protection Fault at eip=112ac
> eax=00000000 ebx=00000000 ecx=0000014c edx=00162af0 esi=001b1d80 edi=0080b951
> ebp=001ac6f0 esp=001ac62c cs=af ds=a7 es=a7 fs=a7 gs=a7 ss=b7 cr2=0000cfe4
> Call frame traceback EIPs:
> 0x000112ac
> 0x0000b0a6
> 0x00049ccc
> 0x00071ddb
> 0x000768f2
>
>
Another hint: cc1plus.exe shouldn't dump core on this relatively simple error.
This seems to indicate that you still use the (quite bugged) 2.6.0 version
of gcc in DJGPP. In that case, you *really* should go and get version 2.6.3,
it should be more stable.
Hans-Bernhard
- Raw text -