Compile a simple program on ubuntu arm

后端 未结 3 1176
滥情空心
滥情空心 2020-12-21 18:21

I have a simple program

#include 
int main(){
  g_print(\"hallo\\n\");
}

and try to compile it on the embedded system (Odroid

3条回答
  •  伪装坚强ぢ
    2020-12-21 18:42

    Ok found a solution

    gcc -o main main.c  `pkg-config --libs --cflags glib-2.0`
    

    works, but I don't know why on my X64 linux system it worked also the other way.

提交回复
热议问题