본문 바로가기

컴퓨터/C

C 크로스 컴파일

1. 컴파일러 설치

sudo apt-get install mingw-w64

2. 컴파일

1) 동적링크

i686-w64-mingw32-gcc -o output.exe input.c `pkg-config --cflags --libs gtk+-3.0 --static` -static

2) 정적링크

gcc -o output input.c `pkg-config --cflags --libs gtk+-3.0 --static` -static

'컴퓨터 > C' 카테고리의 다른 글

C GUI 프로그래밍  (0) 2023.04.02
C strtok()  (0) 2022.11.23
C strstr()  (0) 2022.11.23
C dup()  (0) 2022.11.23
C pthread_detach()  (0) 2022.11.23