This is my first time using GTK and I am using GTK+ 2.0. I get these link errors when I tried to build the hello world program from the GTK+ 2.0 tutorial:
Linking...
hello world.obj : error LNK2001: unresolved external symbol _gtk_widget_destroy
hello world.obj : error LNK2001: unresolved external symbol "void __cdecl gtk_main(void)" (?gtk_main@@$$J0YAXXZ)
hello world.obj : error LNK2001: unresolved external symbol "void __cdecl gtk_widget_show(struct _GtkWidget *)" (?gtk_widget_show@@$$J0YAXPAU_GtkWidget@@@Z)
hello world.obj : error LNK2001: unresolved external symbol "void __cdecl gtk_container_add(struct _GtkContainer *,struct _GtkWidget *)" (?gtk_container_add@@$$J0YAXPAU_GtkContainer@@PAU_GtkWidget@@@Z)
hello world.obj : error LNK2001: unresolved external symbol "struct _GtkWidget * __cdecl gtk_button_new_with_label(char const *)" (?gtk_button_new_with_label@@$$J0YAPAU_GtkWidget@@PBD@Z)
hello world.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl gtk_container_get_type(void)" (?gtk_container_get_type@@$$J0YAKXZ)
hello world.obj : error LNK2001: unresolved external symbol "void __cdecl gtk_container_set_border_width(struct _GtkContainer *,unsigned int)" (?gtk_container_set_border_width@@$$J0YAXPAU_GtkContainer@@I@Z)
hello world.obj : error LNK2001: unresolved external symbol "struct _GTypeInstance * __cdecl g_type_check_instance_cast(struct _GTypeInstance *,unsigned long)" (?g_type_check_instance_cast@@$$J0YAPAU_GTypeInstance@@PAU1@K@Z)
hello world.obj : error LNK2001: unresolved external symbol "unsigned long __cdecl g_signal_connect_data(void *,char const *,void (__cdecl*)(void),void *,void (__cdecl*)(void *,struct _GClosure *),enum GConnectFlags)" (?g_signal_connect_data@@$$J0YAKPAXPBDP6AXXZ0P6AX0PAU_GClosure@@@ZW4GConnectFlags@@@Z)
hello world.obj : error LNK2001: unresolved external symbol "struct _GtkWidget * __cdecl gtk_window_new(enum GtkWindowType)" (?gtk_window_new@@$$J0YAPAU_GtkWidget@@W4GtkWindowType@@@Z)
hello world.obj : error LNK2001: unresolved external symbol "void __cdecl gtk_init_abi_check(int *,char * * *,int,unsigned int,unsigned int)" (?gtk_init_abi_check@@$$J0YAXPAHPAPAPADHII@Z)
hello world.obj : error LNK2001: unresolved external symbol "void __cdecl g_print(char const *,...)" (?g_print@@$$J0YAXPBDZZ)
hello world.obj : error LNK2001: unresolved external symbol "void __cdecl gtk_main_quit(void)" (?gtk_main_quit@@$$J0YAXXZ)
C:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\Test Interface\Debug\Test Interface.exe : fatal error LNK1120: 13 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Administrator\My Documents\Visual Studio Projects\Test Interface\Test Interface\Debug\BuildLog.htm"
Test Interface - 14 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped
Do I need to add any other files to my working directory other then the header files? I'm also using Visual C++.Net as my compliler.
Thank you in advanced for your help
The new MSN 8: smart spam protection and 2 months FREE* _______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list