Thread: Opening file at command line

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    13

    Opening file at command line

    I'm using Unix at the school (alpha). To compile I usually type cxx *.cpp and it gives me an a.out file. I typed a.out and it shows me the output for the progam. If I need to type the names of the input and output files at the command line, how do I do that? When I compile by typing "cxx *.cpp" it gives me this msg:



    Code:
    ld (prelink):
    processInfile.o compressed: processInfile(ifstream&, char&): multiply defined
    ld:
    processInfile.ocompressed: processInfile(ifstream&, char&): multiply defined
    It creates an a.out file, but if I type a.out, it says execute permission denied. If I type "cxx *.cpp blob1.dat outfile.dat" it gives me:

    Code:
    Object file format error in: blob1.dat: read_pass1_info_malloc: bad file magic n
    umber
    ld:
    processInfile.o compressed: processInfile(ifstream&, char&): multiply defined
    Object file format error in: blob1.dat: read_cur_obj_info: bad file magic number
    (0x2c32)
    Last edited by Wiggin; 04-27-2002 at 01:31 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM