当前位置:网站首页>GTK interface programming (I): Environment Construction
GTK interface programming (I): Environment Construction
2022-06-30 02:51:00 【EEer!】
List of articles
One 、 Environment building
1. install GNU Compile link tool
sudo apt-get install build-essential
2. install gtk3
sudo apt-get install libgtk-3-dev
3. install pkg-config For automatic discovery gtk The location of the header file
sudo apt-get install pkg-config
After installation , You can use the following command to verify that the installation was successful , And look at GTK+3.0 The path of all the included header files and libraries :
pkg-config --cflags --libs gtk+-3.0
The verification results :
4.GUI verification
Use the official example to test whether it can run
main.c The sample code is as follows :
#include <gtk/gtk.h>
int main( int argc, char *argv[])
{
GtkWidget *window;
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_widget_show(window);
gtk_main();
return 0;
}
The compilation instructions are as follows :
sudo gcc main.c -o main `pkg-config --cflags --libs gtk+-3.0`
function :
./main
The verification results :
Two 、GTK Official documents
https://docs.gtk.org/gtk3/
边栏推荐
- 论文回顾:Playful Palette: An Interactive Parametric Color Mixer for Artists
- Pytoch learning (II)
- Some configuration details about servlet initial development
- Recursion frog jumping steps problem
- 打造创客教育中精湛技艺
- 重磅来袭--UE5的开源数字孪生解决方案
- SQLite use
- 银行的理财产品一般期限是多久?
- 2022 the action of protecting the net is imminent. Things about protecting the net
- 身份证号的严谨判断精确到队后一位
猜你喜欢

What files does a CA digital certificate contain? How to view SSL certificate information?

Unity timeline data binding

LeetCode 3. Longest substring without duplicate characters

High paid programmers & interview questions series 63: talk about the differences between sleep (), yield (), join (), and wait ()

What is digicert smart seal?

Study diary: February 15, 2022

Raki's notes on reading paper: neighborhood matching network for entity alignment

SSL证书七大常见错误及解决方法

Three solutions to forced hibernation of corporate computers

Pytorch学习(二)
随机推荐
Raki's notes on reading paper: neighborhood matching network for entity alignment
【npm】解决使用npm安装TypeORM的报错问题
Wechat applet page Jump and parameter transfer
2. 成功解决 BUG:Exception when publishing, ...[Failed to connect and initialize SSH connection...
三层交换机和二层交换机区别是什么
NPDP产品经理国际认证考试报名有什么要求?
What is the difference between a layer 3 switch and a layer 2 switch
Multi card server usage
备忘一下es6的export/import和类继承的用法
学术汇报(academic presentation)/PPT应该怎么做?
Two methods of SSL certificate format conversion
How long is the general term of the bank's financial products?
原生JS怎么生成九宫格
Global and Chinese market of ERP software for garment and textile industries 2022-2028: Research Report on technology, participants, trends, market size and share
Shenzhen CPDA Data Analyst Certification in July 2022
What is the concept of string in PHP
Unity3d ugui force refresh of layout components
What is an X.509 certificate? 10. 509 certificate working principle and application?
[Postgres] Postgres database migration
外汇交易平台哪个好?有监管的资金就安全吗?