compile c/c++ on ubuntu

28/01/2008 at 19:54 | In Uncategorized | 1 Comment
Tags: , ,

first install package name build-essential

$ sudo apt-get install build-essential

for compile c use this command

$ gcc filename.c

for compile c++ use this command

$ g++ filename.cpp

after compile will get file name a.out

if want to change file name add this parameter when compile

$ gcc filename.c -o output_filename or $ g++ filename.cpp -o output_filename

for run the program use this command

$ ./filename ex. $./a.out

1 ความเห็น »

RSS feed สำหรับความเห็นต่อเรื่องนี้ TrackBack URI

  1. เยี่ยม จิงๆ


ใส่ความเห็น

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

บลอกที่ WordPress.com . | Theme: Pool by Borja Fernandez.
Entries and comments feeds.