Author Topic: a problem in WXwidgets project  (Read 5530 times)

Offline parisa_k

  • Multiple posting newcomer
  • *
  • Posts: 23
a problem in WXwidgets project
« on: September 03, 2008, 01:01:52 pm »
I have started a new projects in WXwidgets...but when I run it the following errors appear ...it seems that the problem is with some header files...am I right? what`s your suggestion to solve it...
-----------------------------------------------------------------------------
||warning: ./wx_pch.h.gch/Debug_wx_pch_h_gch: not for GNU C|
/usr/local/include/wx-2.8/wx/buffer.h|127|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxCharBuffer’|
/usr/local/include/wx-2.8/wx/buffer.h|129|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxWritableCharBuffer’|
/usr/local/include/wx-2.8/wx/buffer.h|134|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxWCharBuffer’|
/usr/local/include/wx-2.8/wx/buffer.h|136|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxWritableWCharBuffer’|
/usr/local/include/wx-2.8/wx/buffer.h|152|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxWxCharBuffer’|
/usr/local/include/wx-2.8/wx/buffer.h|165|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMemoryBufferData’|
/usr/local/include/wx-2.8/wx/buffer.h|222|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMemoryBuffer’|
/usr/local/include/wx-2.8/wx/strconv.h|52|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConv’|
/usr/local/include/wx-2.8/wx/strconv.h|171|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConvLibc’|
/usr/local/include/wx-2.8/wx/strconv.h|189|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxConvBrokenFileNames’|
/usr/local/include/wx-2.8/wx/strconv.h|231|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConvUTF7’|
/usr/local/include/wx-2.8/wx/strconv.h|244|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConvUTF8’|
/usr/local/include/wx-2.8/wx/strconv.h|268|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConvUTF16Base’|
/usr/local/include/wx-2.8/wx/strconv.h|287|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConvUTF16LE’|
/usr/local/include/wx-2.8/wx/strconv.h|301|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConvUTF16BE’|
/usr/local/include/wx-2.8/wx/strconv.h|315|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConvUTF32Base’|
/usr/local/include/wx-2.8/wx/strconv.h|333|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConvUTF32LE’|
/usr/local/include/wx-2.8/wx/strconv.h|347|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConvUTF32BE’|
/usr/local/include/wx-2.8/wx/strconv.h|363|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxCSConv’|
/usr/local/include/wx-2.8/wx/strconv.h|425|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/local/include/wx-2.8/wx/strconv.h|428|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/local/include/wx-2.8/wx/strconv.h|429|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/local/include/wx-2.8/wx/strconv.h|430|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/local/include/wx-2.8/wx/strconv.h|439|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token|
/usr/local/include/wx-2.8/wx/strconv.h|446|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token|
/usr/local/include/wx-2.8/wx/strconv.h|449|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/local/include/wx-2.8/wx/strconv.h|455|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token|
/usr/local/include/wx-2.8/wx/strconv.h|465|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConvUTF16’|
/usr/local/include/wx-2.8/wx/strconv.h|466|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxMBConvUTF32’|
/usr/local/include/wx-2.8/wx/string.h|58|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxString’|
/usr/local/include/wx-2.8/wx/string.h|104|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘IsEmpty’|
/usr/local/include/wx-2.8/wx/string.h|176|error: string: No such file or directory|
/usr/local/include/wx-2.8/wx/string.h|186|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token|
/usr/local/include/wx-2.8/wx/string.h|223|error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘const’|
/usr/local/include/wx-2.8/wx/string.h|252|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxStringBase’|
/usr/local/include/wx-2.8/wx/string.h|659|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxString’|
/usr/local/include/wx-2.8/wx/string.h|1421|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘operator’|
/usr/local/include/wx-2.8/wx/string.h|1422|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘operator’|
/usr/local/include/wx-2.8/wx/string.h|1423|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘operator’|
/usr/local/include/wx-2.8/wx/string.h|1424|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘operator’|
/usr/local/include/wx-2.8/wx/string.h|1425|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘operator’|
/usr/local/include/wx-2.8/wx/string.h|1438|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/local/include/wx-2.8/wx/string.h|1503|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxStringBuffer’|
/usr/local/include/wx-2.8/wx/string.h|1521|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘wxStringBufferLength’|
/usr/local/include/wx-2.8/wx/string.h|1560|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘operator’|
/usr/local/include/wx-2.8/wx/string.h|1562|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘operator’|
/usr/local/include/wx-2.8/wx/string.h|1564|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘operator’|
/usr/local/include/wx-2.8/wx/string.h|1566|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘operator’|
/usr/local/include/wx-2.8/wx/string.h|1568|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘operator’|
/usr/local/include/wx-2.8/wx/string.h|1570|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘operator’|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|

||=== Build finished: 50 errors, 1 warnings ===|

-----------------------------------------------------------
thanks

Offline rcoll

  • Almost regular
  • **
  • Posts: 150
Re: a problem in WXwidgets project
« Reply #1 on: September 03, 2008, 07:29:05 pm »
Did you see that line:

||warning: ./wx_pch.h.gch/Debug_wx_pch_h_gch: not for GNU C|

This file was apparently (pre-)compiled using a different compiler than the one you are now using.  Delete this file (wx_pch.h.gch) and try to compile again.

Ringo

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7018
    • My Best Post
Re: a problem in WXwidgets project
« Reply #2 on: September 03, 2008, 07:31:18 pm »
Guesses
1. You named an C++ file with extension c instead of cpp; C::B uses the extension to decide whether to use g++ or gcc
2. An corrupted precompiled header; in windows you just delete the file and it is recreated.
    (wx_pch.h.gch/Debug_wx_pch_h_gch)
3. An bug in C::B that might be able to work around by changing project properties for precompiled header location.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline parisa_k

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: a problem in WXwidgets project
« Reply #3 on: September 06, 2008, 05:42:38 am »
I have started a Wxwidgets project...the compiler is set to GNU GCC Compiler
and then I have added some .c files to it ....does it make the problem?

I `m working on FC8
I can`t delete wx_pch.h.gch ...because then an error on this line is given:
#include "wx_pch.h"

what`s the solution?

« Last Edit: September 06, 2008, 05:47:26 am by parisa_k »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7018
    • My Best Post
Re: a problem in WXwidgets project
« Reply #4 on: September 06, 2008, 05:56:36 am »
If it is really an .c file (C Language instead of C++) then do NOT include c++ headers. This includes header used for precompilied reasons.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline parisa_k

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: a problem in WXwidgets project
« Reply #5 on: September 06, 2008, 06:06:45 am »
you mean I should remove all of the 'includes' in .cpp files? but I did so and it gives errors

------
let me tell you what I  exactly want to do,
I want to make a graphical interface for a project that is written in C language...for this purpose as I said before, I have started a Wxwidgets project and added the .C files to it ......
--------

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7018
    • My Best Post
Re: a problem in WXwidgets project
« Reply #6 on: September 06, 2008, 06:14:22 am »
You need to find an programming forum to help your learn the basics of programming.
The Code::Blocks forum is not for learning the C/C++ Language.


Do you know the difference between C and C++ code?
Because your answers implies you do not know it!

EDIT: As I stated before Code::Blocks thinks .c files contains C code. And, .cpp files contain C++ code.

Do you know the difference between an IDE, Compiler, and Linker?

Do you know the difference between source (.c and .cpp) and header (.h) files?

I think you need someone or some site to teach you the basics of C/C++ programing.

Edit2: wxWidgets is an C++ Library calling it with C code is not for an beginner to do.

Tim S
« Last Edit: September 06, 2008, 06:18:37 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline parisa_k

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: a problem in WXwidgets project
« Reply #7 on: September 06, 2008, 08:06:27 am »
before, I thought that I know the meaning of this concepts but know I`m getting suspected........
but any way what does this mean?
Edit2: wxWidgets is an C++ Library calling it with C code is not for an beginner to do.
I just wan`t to know is it possible  to make a graphical interface for a C project using code blocks or no (the answer is just yes or no)
thanks

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7018
    • My Best Post
Re: a problem in WXwidgets project
« Reply #8 on: September 06, 2008, 08:14:57 am »
I just wan`t to know is it possible  to make a graphical interface for a C project using code blocks or no (the answer is just yes or no)
thanks
The answer is Yes.

Wish you luck, you will need it; since you don't know the difference between IDE and Compiler!!!!
And, I think you are not sure what an Library is either. For example, wxWidgets is an Library; Code::Blocks is an IDE; MinGW GCC is an Compiler.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org