Hello Jim!
On Thu, Jan 27, 2011 at 12:13 AM, Jim Michaels <[email protected]> wrote:
> the errors I am getting on this first line indicate to me that mingw-w64 is
> interpreting my function prototype as a variable.
> why is this?
Don't know.
> I am using the fltk windowing toolkit and its headers. this function is not
> defined anywhere in fltk.
I don't have those. I hope they're not the problem.
> void OnBTNOKcallback(FL_Button *w, void *userdata);//error: variable or
> field 'OnBTNOKcallback' declared void
That's odd.
I can compile the complete translation unit (single file):
-- contents of test_file.cpp --
typedef int FL_Button;
void OnBTNOKcallback(FL_Button *w, void *userdata);
-- end of test_file.cpp --
"g++ -c test_file.cpp" runs without error for me.
"g++ --version" reports:
g++ (GCC) 4.5.2 20101002 (prerelease) [svn/rev.164902 - mingw-w64/oz]
Maybe some of the other errors you report might be
the actual cause, but my test suggests that it's not
the compiler and not, in isolation, the specific line
of code you refer to.
> class CMessageBox/* : public Fl_Window*/ {
> private:
> Fl_Button *msgButton;
> ...
>
> kitchentimer.cpp:402: error: variable or field 'OnBTNOKcallback' declared
> void
> kitchentimer.cpp:402: error: 'w' was not declared in this scope
> ...
> here is the compiler -v switch output:
> -----------------------------
>
> Using built-in specs.
> Target: i686-w64-mingw32
> ...
> GNU C++ (GCC) version 4.4.5 20101001 (release) [svn/rev.164871 -
> mingw-w64/oz] (i686-w64-mingw32)
> ...
Well, we're not using exactly the same version of the compiler,
but I really doubt it's the compiler. Can you compile my
test_file.cpp with your version of the compiler?
> -------------
> Jim Michaels
> [email protected]
Good luck.
K. Frank
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public