IT Guy

IT、AI / Machine Learning、IoT、Project Management、プログラミング、ITIL等々

Windows10のWSLでUbuntu

手順(下記のLinkに従って)

  • WSL構築
  • インストール後、「sudo apt-get update」は最初にしておこう
  • C/C++開発環境構築
demo@JP:~$ sudo apt-get update 
demo@JP:~$ sudo apt-get install build-essential

Link

qiita.com

qiita.com

動作確認

Hello World

demo@JP:~/code/c$ more hello.c
#include <stdio.h>
 
int main(void)
{
    printf("Hello World!\n");

    return 0;
}

Run

demo@JP:~/code/c$ ls
hello.c
demo@JP:~/code/c$ make hello
cc     hello.c   -o hello
demo@JP:~/code/c$ ./hello
Hello World!
demo@JP:~/code/c$