Results 1 to 4 of 4

Thread: [SOLVED] Problems with gcc compiler

  1. #1
    Join Date
    Jun 2008
    Beans
    1

    [SOLVED] Problems with gcc compiler

    For some reason, I can't run the executable generated from compiling a c and c++ program with the gcc compiler. The c program gives an error: "bash: com: command not found" when I try to run the executable file by typing the name of the file, com, into the terminal in the directory it's in. The c++ program doesn't display any errors and doesn't do anything at all.
    To compile, I'm using the command: "g++ test.cxx -o test" for the c++ program and "g++ com.c -o com" for the c program.
    I have the gcc compiler on my windows machine and it generates an executable which works perfectly.

    Thanks for any help.

  2. #2
    Join Date
    Jan 2007
    Location
    $here ? $here : $there
    Beans
    3,717
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Problems with gcc compiler

    You need to type:

    Code:
    ./test
    Or

    Code:
    ./com
    By default the current directory is not in the path so you have to explicitly specify what you are referring to.
    Don't try to make something "fast" until you are able to quantify "slow".

  3. #3
    Join Date
    Jan 2007
    Location
    Location: Location:
    Beans
    1,246
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems with gcc compiler

    sudo apt-get install gcc, try compiling it with gcc instead of g++. same problem?
    clear && echo paste url and press enter; read paste; (youtube-dl $paste) | zenity --progress --title="" --text "Downloading, please wait" --auto-close --pulsate && ans=$(zenity --file-selection); gnome-terminal -x mplayer "$ans"

  4. #4
    Join Date
    Jan 2007
    Location
    Location: Location:
    Beans
    1,246
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems with gcc compiler

    lol so thats why i always end up with a.out lmao
    clear && echo paste url and press enter; read paste; (youtube-dl $paste) | zenity --progress --title="" --text "Downloading, please wait" --auto-close --pulsate && ans=$(zenity --file-selection); gnome-terminal -x mplayer "$ans"

Bookmarks

Posting Permissions

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