how to compiline c++ program from unix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • siddheshccpp
    New Member
    • Mar 2008
    • 2

    how to compiline c++ program from unix

    how to compiline c++ program from unix
  • satch
    New Member
    • Feb 2008
    • 23

    #2
    Originally posted by siddheshccpp
    how to compiline c++ program from unix
    g++ <filename> -o <outputFilename >
    I hope this works because the command will depend on the compiler that is installed on your system.

    Read the following links(as a result of quick google search) for details :
    http://www.actcom.co.i l/~choo/lupg/tutorials/c-on-unix/c-on-unix.html
    http://www.cse.msu.edu/~cse231/HowToCompile.ht ml

    Comment

    • JonLT
      New Member
      • Jul 2007
      • 41

      #3
      you want to compile unix code on a windows machine?
      You'll need GCC (use MinGW)
      It might also be easier if you have the library-files you need compiled in wondows (even thought that shouldn't be necessary if you use GCC)

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        Originally posted by satch
        g++ <filename> -o <outputFilename >
        I hope this works because the command will depend on the compiler that is installed on your system.

        Read the following links(as a result of quick google search) for details :

        http://www.cse.msu.edu/~cse231/HowToCompile.html
        I'd listen to satch on this one. Haven't checked the links, but the commands are correct.

        One more thing that can be added to that, though is that you do have to either 1) be in the directory your program is in, 2) add that directory to your path, or 3) use the full filepath there <filename> and <outputFilename > are.

        Comment

        Working...