Find the answer to your Linux question:
Results 1 to 4 of 4
Hi. This is my first post in thz forum... nd im new to linux.........i want to compile and execute a cpp program... which takes two files as the command line ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Posts
    2

    compiling a cpp program that takes two files as inputs in command line


    Hi.

    This is my first post in thz forum... nd im new to linux.........i want to compile and execute a cpp program... which takes two files as the command line arguments...

    one source file called..... source.avi.. and the other reference file called reference.avi...

    the name of the program is pevq.cpp...

    can u please tell me the command to compile and run the above program.............



    Schum_007

  2. #2
    Linux User fernape's Avatar
    Join Date
    Dec 2005
    Location
    Holland
    Posts
    301
    Well, did you try with g++?

    And to run, simply type:

    ./executable_name argument1 argument2

    Best regards

  3. #3
    Linux User
    Join Date
    Aug 2005
    Location
    Italy
    Posts
    401
    Quote Originally Posted by schum_007
    can u please tell me the command to compile and run the above program...
    Schum_007
    g++ -o <output-program> *.cpp
    When using Windows, have you ever told "Ehi... do your business?"
    Linux user #396597 (http://counter.li.org)

  4. #4
    Just Joined!
    Join Date
    Apr 2006
    Posts
    1
    Quote Originally Posted by burnit
    g++ -o <output-program> *.cpp
    that's right,and then ./<output-program> to run

Posting Permissions

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