LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-15-2009, 05:27 AM   #1
benni1
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Rep: Reputation: 0
passing arg 1 of `gtk_widget_show' from incompatible pointer type


Hi,

i get a warning from my gcc compiler concerning some GTK+ source code:

gtk_gui.c:1900: warning: passing arg 1 of `gtk_widget_show' from incompatible pointer type

Here's the code with initalisation:

GtkImage *Image[30];
gtk_image_set_from_file (Image[i-index_artikel],bild_file);
gtk_widget_show (Image[i-index_artikel]);


** bild_file is the right path to the images **

So where's the prob? i am not allowed to directly show an image in an array by gtk_widget_show?

Hope someone can help me here.

Thx in advance!
Benni
 
Old 05-15-2009, 06:24 AM   #2
benni1
LQ Newbie
 
Registered: Apr 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Ok, i have the solution:

just casting it to a GtkWidget with
"(GtkWidget*)Image[]..."

Its just that easy when you can read the API Documentation!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
passing arg 3 of `pthread_create' from incompatible pointer type wallwaters Programming 8 03-08-2010 02:46 AM
warning: passing argument 3 of ‘pthread_create’ from incompatible pointer type eCli Programming 1 01-19-2009 08:44 AM
What is the warning: passing arg 3 of `pthread_create' from incompatible pointer type wallwaters Linux - Software 3 06-01-2005 09:30 AM
Passing arg 3 of blah makes pointer from integer without a cast xconspirisist Programming 6 08-22-2004 09:04 AM
Getting an incompatible pointer type error... JStew Programming 4 03-06-2003 06:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration