Results 1 to 10 of 10

Thread: Borland C++ 5.5.1

  1. #1
    ChimpFace9000
    Guest

    Post 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?

  2. #2
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Just guessing, but void functions can't return stuff.
    Alcohol & calculus don't mix.
    Never drink & derive.

  3. #3
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    What error do you get?
    Alcohol & calculus don't mix.
    Never drink & derive.

  4. #4
    ChimpFace9000
    Guest
    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

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  6. #6
    ChimpFace9000
    Guest
    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.

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    What wasn't in the path?
    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

  8. #8
    ChimpFace9000
    Guest
    The folder for Borland C++

  9. #9
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  10. #10
    ChimpFace9000
    Guest
    I dont know.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width