User forums > Help

problem at compiling a project with wxWidgets

(1/3) > >>

mkd:
Hi all,

I've got a quite strange problem. I installed wxWidgets (wxPack) a few days ago and everything worked well - till yesterday. Since yesterday (I didn't change anything in the project / compiler options) I'm getting tons of errors when I'm trying to compile a project with wxWidgets. Alle other project files compile without problems. The most interesting thing is: the problem first appeared short after a successful compilation (I didn't restart Codeblocks).


--- Quote ---cc1.exe: warning: ./wx_pch.h.gch/Debug_wx_pch_h_gch: not for GNU C
In file included from C:/Frameworks/wxWidgets2.8.9/include/wx/wxprec.h:46,
                 from ./wx_pch.h:14,
                 from <command line>:7:
C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcctl.h: In function `wxSetCCUnicodeFormat':
C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcctl.h:48: error: syntax error before ':' token
C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcctl.h: At top level:
C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcctl.h:58: error: syntax error before "wxFont"
C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcctl.h:58: warning: type defaults to `int' in declaration of `wxFont'
C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcctl.h:58: warning: data definition has no type or storage class
C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcctl.h:59: error: syntax error before "wxGetCCDefaultFont"
C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcctl.h:59: warning: type defaults to `int' in declaration of `wxGetCCDefaultFont'
C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcctl.h:59: warning: data definition has no type or storage class
In file included from C:/Frameworks/wxWidgets2.8.9/include/wx/string.h:55,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/log.h:47,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/msw/private.h:24,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcdlg.h:18,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/wxprec.h:47,
                 from ./wx_pch.h:14,
                 from <command line>:7:
C:/Frameworks/wxWidgets2.8.9/include/wx/buffer.h:127: warning: type defaults to `int' in declaration of `class'
C:/Frameworks/wxWidgets2.8.9/include/wx/buffer.h:127: error: syntax error before "wxCharBuffer"
C:/Frameworks/wxWidgets2.8.9/include/wx/buffer.h:127: error: syntax error before ':' token
C:/Frameworks/wxWidgets2.8.9/include/wx/buffer.h: In function `release':
C:/Frameworks/wxWidgets2.8.9/include/wx/buffer.h:127: error: syntax error before '{' token
C:/Frameworks/wxWidgets2.8.9/include/wx/buffer.h:152: warning: type defaults to `int' in declaration of `wxCharBuffer'
C:/Frameworks/wxWidgets2.8.9/include/wx/buffer.h:152: error: storage class specified for parameter `wxCharBuffer'
C:/Frameworks/wxWidgets2.8.9/include/wx/buffer.h:152: error: syntax error before "wxWxCharBuffer"
C:/Frameworks/wxWidgets2.8.9/include/wx/buffer.h:218: error: syntax error before "private"
In file included from C:/Frameworks/wxWidgets2.8.9/include/wx/string.h:56,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/log.h:47,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/msw/private.h:24,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcdlg.h:18,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/wxprec.h:47,
                 from ./wx_pch.h:14,
                 from <command line>:7:
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:88: warning: type defaults to `int' in declaration of `wxWCharBuffer'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:88: error: syntax error before "cMB2WC"
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:89: warning: type defaults to `int' in declaration of `wxCharBuffer'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:89: error: conflicting types for 'wxCharBuffer'
C:/Frameworks/wxWidgets2.8.9/include/wx/buffer.h:152: error: previous definition of 'wxCharBuffer' was here
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:89: error: syntax error before "cWC2MB"
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:104: warning: type defaults to `int' in declaration of `wxWCharBuffer'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:104: error: redefinition of parameter 'wxWCharBuffer'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:88: error: previous definition of 'wxWCharBuffer' was here
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:104: error: syntax error before "cMB2WC"
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:106: warning: type defaults to `int' in declaration of `wxCharBuffer'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:106: error: redefinition of parameter 'wxCharBuffer'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:89: error: previous definition of 'wxCharBuffer' was here
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:106: error: syntax error before "cWC2MB"
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:115: error: syntax error before "const"
In file included from C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:361,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/string.h:56,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/log.h:47,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/msw/private.h:24,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcdlg.h:18,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/wxprec.h:47,
                 from ./wx_pch.h:14,
                 from <command line>:7:
C:/Frameworks/wxWidgets2.8.9/include/wx/fontenc.h:148: warning: enum defined inside parms
C:/Frameworks/wxWidgets2.8.9/include/wx/fontenc.h:148: warning: empty declaration
In file included from C:/Frameworks/wxWidgets2.8.9/include/wx/string.h:56,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/log.h:47,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/msw/private.h:24,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/msw/wrapcdlg.h:18,
                 from C:/Frameworks/wxWidgets2.8.9/include/wx/wxprec.h:47,
                 from ./wx_pch.h:14,
                 from <command line>:7:
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:363: error: syntax error before "class"
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:398: error: syntax error before "const"
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:411: error: syntax error before "wxFontEncoding"
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:425: warning: type defaults to `int' in declaration of `wxMBConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:425: error: storage class specified for parameter `wxMBConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:425: error: syntax error before '&' token
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:428: warning: type defaults to `int' in declaration of `wxCSConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:428: error: storage class specified for parameter `wxCSConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:428: error: syntax error before '&' token
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:429: warning: type defaults to `int' in declaration of `wxMBConvUTF7'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:429: error: storage class specified for parameter `wxMBConvUTF7'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:429: error: syntax error before '&' token
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:430: warning: type defaults to `int' in declaration of `wxMBConvUTF8'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:430: error: storage class specified for parameter `wxMBConvUTF8'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:430: error: syntax error before '&' token
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:439: warning: type defaults to `int' in declaration of `wxMBConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:439: error: storage class specified for parameter `wxMBConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:439: error: redefinition of parameter 'wxMBConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:425: error: previous definition of 'wxMBConv' was here
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:439: error: syntax error before '*' token
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:446: warning: type defaults to `int' in declaration of `wxMBConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:446: error: storage class specified for parameter `wxMBConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:446: error: redefinition of parameter 'wxMBConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:439: error: previous definition of 'wxMBConv' was here
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:446: error: syntax error before '*' token
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:449: warning: type defaults to `int' in declaration of `wxCSConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:449: error: storage class specified for parameter `wxCSConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:449: error: redefinition of parameter 'wxCSConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:428: error: previous definition of 'wxCSConv' was here
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:449: error: syntax error before '&' token
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:455: warning: type defaults to `int' in declaration of `wxMBConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:455: error: storage class specified for parameter `wxMBConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:455: error: redefinition of parameter 'wxMBConv'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:446: error: previous definition of 'wxMBConv' was here
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:455: error: syntax error before '*' token
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:465: warning: type defaults to `int' in declaration of `wxMBConvUTF16LE'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:465: error: storage class specified for parameter `wxMBConvUTF16LE'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:465: error: syntax error before "wxMBConvUTF16"
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:466: warning: type defaults to `int' in declaration of `wxMBConvUTF32LE'
C:/Frameworks/wxWidgets2.8.9/include/wx/strconv.h:466: error: storage class specified for parameter `wxMBConvUTF32LE'

--- End quote ---

Thanks in advance,

mkd

ollydbg:

--- Quote ---The most interesting thing is: the problem first appeared short after a successful compilation (I didn't restart Codeblocks).

--- End quote ---
Strange problem. You have tried Rebuild this project? It seems you are using ccl.exe, it is a compiler from VC++?

mkd:
Yeah, I rebuilded the whole project two or three times and no, it's MinGW not VC++. I installed the Codeblocks with MinGW package.

ollydbg:

--- Quote from: mkd on March 25, 2009, 06:37:44 am ---Yeah, I rebuilded the whole project two or three times and no, it's MinGW not VC++. I installed the Codeblocks with MinGW package.

--- End quote ---
which version of c::b do you use? nightly build? or 8.02? which mingw version? 3.45? or 4.x?
I have used wxPack before, but now, I manually build the wxWidgets library myself, it's not so hard.

Jenna:

--- Quote from: mkd on March 24, 2009, 08:22:39 pm ---
--- Quote ---cc1.exe: warning: ./wx_pch.h.gch/Debug_wx_pch_h_gch: not for GNU C

--- End quote ---

--- End quote ---

It seems you use a c-compiler.
wxWidgets needs c++.

Do you have files named *.c (that includes wxWidgets headers, either directly or via precompiled header) in your project, or did you (accidently) change your compiler toolchain ?

Make sure you have g++.exe or mingw32-g++.exe or whatever it is called as c++-compiler in the toolchain you use.

Do not try to include c++-headers (using classes) in c-files (c does not know classes).

C::B uses the fules suffix to decide whether a file is a c- or a c++-file.

Navigation

[0] Message Index

[#] Next page

Go to full version