xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] fdesign created c files, invalid conversion


From: Rouben Rostamian
Subject: Re: [XForms] fdesign created c files, invalid conversion
Date: Thu, 28 Oct 2010 16:54:42 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Oct 28, 2010 at 01:08:06PM -0700, John Wang wrote:
>
> I am using the currently latest version of xforms on a 64 bit ubuntu
> 10.10. Whenever I created a c file with fdesign, gcc will complain
> about invalid conversion from void* to FD_foo* at the line:
>
> FD_foo *fdui = fl_malloc( sizeof *fdui );
>
> to fix it, I will need to cast it properly like so:
>
> FD_foo *fdui = (FD_foo) fl_malloc( sizeof *fdui );

The one without the cast is proper C.  Don't add a cast.
The problem lies elsewhere.

My guess: You named your file "foo.C" with capital C.  If so,
gcc assumes that this is a C++ (not C) file and gets confused.
Call your file "foo.c" with lowercase c and try again.

-- 
Rouben Rostamian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]