Compiling and Linking GTK 3 with C project on Ubuntu

前端 未结 2 1630
耶瑟儿~
耶瑟儿~ 2021-02-07 04:18

I believe this is not a duplicate question, I have seen all questions/answers before I post this question. I think I have a different situation here.

I use Ubuntu 12.04

2条回答
  •  清歌不尽
    2021-02-07 05:12

    You could also include the gtk library directly into your project:

    1. In Eclipse expand: Project > Properties > C/C++ Build > Settings > Tool Settings > Cross GCC Linker > Libraries
    2. Set: Library search path (-L) to path to file "libgtk-n.so", with n as your version. After installing (apt-get install libgtk-3-dev) on Lubuntu this was "/usr/lib/x86_64-linux-gnu/" for me.
    3. Then add to Libraries (-l): gtk-n

提交回复
热议问题