當前位置:首頁 » 編程軟體 » gtk編譯時運行時不需要

gtk編譯時運行時不需要

發布時間: 2024-12-14 20:50:38

1. 在頭文件中含有#include <gtk/gtk.h>,但在通過gcc編譯時會有」gtk/gtk.h,沒有那個文件或目錄」的提示,原

你試試在終端用pkg-config命令查查看需要用-I參數指定哪些目錄才能用gtk。

pkg-config --cflags gtk+-2.0

我執行這個命令後輸出的是
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12

把你執行這個命令後輸出的那一段復制後添加在你gcc的命令行再編譯試試看。

2. 我再ubuntu下安裝OpenCV是編譯的時候沒有提示錯誤,但是在運行程序的時候提示:

簡單的解釋就是你的GTK+2.x要先於OpenCV安裝,所以它給的解決方法是You should remove the current installation of opencv from your system; rebuild your opencv lib after installing gtk dev lib in the correct path; and reinstall the compiled opencv lib.

3. Ubuntu下opencv編譯沒有報錯,但是運行不了

簡單的解釋就是你的GTK+2.x要先於OpenCV安裝,所以它給的解決方法是You should
remove the current installation of opencv from your system; rebuild your
opencv lib after installing gtk dev lib in the correct path; and
reinstall the compiled opencv lib.

熱點內容
電腦突然配置更新是什麼意思 發布:2025-03-12 14:31:01 瀏覽:56
訪問量跟點擊 發布:2025-03-12 14:30:58 瀏覽:102
安卓如何登錄雲服務平台 發布:2025-03-12 14:12:35 瀏覽:520
神奇青蛙安卓版在哪裡下載 發布:2025-03-12 14:05:12 瀏覽:529
曙光牌路由器登錄密碼是多少 發布:2025-03-12 13:51:36 瀏覽:99
舞蹈培訓源碼 發布:2025-03-12 13:34:04 瀏覽:741
電腦與伺服器之間快速傳輸文件 發布:2025-03-12 13:26:55 瀏覽:955
ftp上的文件在伺服器 發布:2025-03-12 13:26:53 瀏覽:416
linux關閉445埠 發布:2025-03-12 13:20:47 瀏覽:219
加密語句表情 發布:2025-03-12 13:17:36 瀏覽:821