Install GCC di OpenSolaris

untuk main – main bahasa c di opensolaris di butuhkan GCC (GNU C Compiler), packet tersebut sudah ada di repository tinggal anda install aja.

$ pfexec pkg install SUNWgcc
PHASE                                          ITEMS
Indexing Packages                            554/554
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    4/4   2086/2086   29.94/29.94

PHASE                                        ACTIONS
Install Phase                              2510/2510
Reading Existing Index                           9/9
Indexing Packages                                4/4

bikin program hello word simpan dengan nama helloword.c :

#include

int main(void){
printf("Hello Word ..!\n");
return 0;
}


compile program :

wehol@opensolaris:~$ gcc helloword.c -o helloword.o

jalankan program :

wehol@opensolaris:~$ ./helloword.o
Hello Word ..!
Advertisements

5 thoughts on “Install GCC di OpenSolaris

  1. he..he.. emang g’ kelihatan stdio nya yang diapit ama kurung panah kri ama kanan.. ha..ha.. kepaksa diomongin de…. kan itu sintak html.. ha.. sorry.. asal komentar..

  2. Pingback: Install GCC di OpenSolaris « Courage To Be A Winner

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s