|
-
May 30th, 2001, 02:51 PM
#1
Borland C++ 5.5.1
Im using the free borland compiler and im trying to make a console application. This is the code im using...
Code:
#include <iostream.h>
void main()
{
return;
}
It compiles and links fine, but when i run it, i get an error. I think it has to do with the way im compiling it. This is what im using...
Code:
bcc32 -c -d -O -O1 -O2 -tC -tWC snake.cpp
ilink32 /ap /Tpe snake.obj, Snake.exe, , , ,
Is there anything wrong with it?
-
May 30th, 2001, 03:16 PM
#2
Fanatic Member
Just guessing, but void functions can't return stuff.
Alcohol & calculus don't mix.
Never drink & derive.
-
May 30th, 2001, 03:16 PM
#3
Fanatic Member
Alcohol & calculus don't mix.
Never drink & derive.
-
May 30th, 2001, 03:33 PM
#4
Your right they cant, and im not returning anything. And heres the error...
Code:
SNAKE caused an invalid page fault in
module SNAKE.EXE at 0177:00401000.
Registers:
EAX=00401000 CS=0177 EIP=00401000 EFLGS=00010a86
EBX=00530000 SS=017f ESP=0063fe3c EBP=0063ff78
ECX=0063ff68 DS=017f ESI=81675164 FS=33ef
EDX=bffc94c0 ES=017f EDI=00000000 GS=0000
Bytes at CS:EIP:
00 00 00 00 35 6c be 2a 00 00 00 00 00 00 01 00
Stack dump:
bff8b560 00000000 81675164 00530000 6b616e53 58450065 81670045 00530000 6b616e53 65780065 575c3a43 4f444e49 535c5357 0063feb0 00000aa8
-
May 30th, 2001, 04:39 PM
#5
Monday Morning Lunatic
Try int main, returning 0. It's too complex for me to go into why it might crash, so just try it
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
May 30th, 2001, 05:07 PM
#6
No thats not it, all my code was perfect. The problem turned out to be that i didnt have it in the path. The simplist answer is probably the right one.
-
May 30th, 2001, 05:47 PM
#7
Monday Morning Lunatic
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
May 31st, 2001, 10:13 AM
#8
The folder for Borland C++
-
Jun 1st, 2001, 02:49 PM
#9
Monday Morning Lunatic
Why should that make a difference to a compiled program?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jun 1st, 2001, 03:07 PM
#10
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|