For help: how to correctly compile the GTK program in Eclipse IDE for C/C ++ Developers ?, Developersgtk

Source: Internet
Author: User

For help: how to correctly compile the GTK program in Eclipse IDE for C/C ++ Developers ?, Developersgtk

The error message is as follows. How can I solve this problem? 00:52:56 ***** Incremental Build of configuration Debug for project Again ***** make all Building file :.. /why. cInvoking: gcc c Compilergcc ".. /why. c "-I/usr/include/glib-2.0-I/usr/include/atk-1.0-I/usr/include/gdk-pixbuf-2.0-I/usr/include/pango-1.0-I/usr /include/cairo-I/usr/lib/i386-linux-gnu/gtk-2.0/include-I/usr/lib/i386-linux-gnu/glib-2.0/include-I/usr/include/gtk-2.0-O0 -g3-Wall 'pkg-con Fig -- cflags gtk +-2.0 '-MMD-MP-MF "why. d "-MT" why. d "-o" why. o "/tmp/cciyb0Cn. o: In function 'main':/home/shw/workspace/Again/Debug /.. /why. c: 5: undefined reference to 'gtk _ init'/home/shw/workspace/Again/Debug /.. /why. c: 6: undefined reference to 'gtk _ window_new '/home/shw/workspace/Again/Debug /.. /why. c: 7: undefined reference to 'gtk _ widget_show '/home/shw/workspace/Again/Debug /.. /why. c: 8: undefined re Ference to 'gtk _ main' collect2: ld returned 1 exit statusmake: *** [why. o] Error 1 has installed gtk 2.24.10 and Eclipse IDE for C/C ++ Developers; eclipse has been configured by <a target = _ blank href = "http://blog.csdn.net/sunny2038/article/details/7082164"> http://blog.csdn.net/sunny2038/article/details/7082164 </a>; already ...... Still error, found similar problem <a target = _ blank href = "http://bbs.chinaunix.net/thread-3775510-1-1.html"> http://bbs.chinaunix.net/thread-3775510-1-1.html </a>, but still not good, too dish! Tutorial: how to compile the GTK program correctly in Eclipse IDE for C/C ++ Developers? Test code: # 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 ;}
 
 
 

Eclipse IDE for C/C ++ Developers Compilation

Compilation failed. It should be because the environment is not properly configured or the library is not found,
LINUX is quite complicated. I had it for a long time...
Brother compiled successfully, but he forgot how to get it...
You can directly get it under WIN. This configuration is very simple. Just add a few words to the environment variable.

How to compile the gtk program using eclipse?

Ubuntu?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.