I want to statically link the amalgamated sqlite3.c/.h units in my GUI app. However, when I add them to my project and try to compile, I get this flood of errors:
||warning: ./wx_pch.h.gch/Debug_wx_pch_h_gch: not for GNU C [enabled by default]|
/usr/include/wx-3.0/wx/buffer.h|19|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|27|error: unknown type name ‘namespace’|
/usr/include/wx-3.0/wx/buffer.h|28|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token|
/usr/include/wx-3.0/wx/buffer.h|65|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|241|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|242|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|246|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|360|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|360|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token|
/usr/include/wx-3.0/wx/buffer.h|380|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|380|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token|
/usr/include/wx-3.0/wx/buffer.h|398|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|416|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|417|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|446|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|447|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token|
/usr/include/wx-3.0/wx/buffer.h|518|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|519|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token|
/usr/include/wx-3.0/wx/strconv.h|29|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/strconv.h|47|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|47|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|47|error: expected ‘,’ or ‘;’ before ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|183|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|183|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|183|error: expected ‘,’ or ‘;’ before ‘wxMBConvLibc’|
/usr/include/wx-3.0/wx/strconv.h|205|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|205|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|205|error: expected ‘,’ or ‘;’ before ‘wxConvBrokenFileNames’|
/usr/include/wx-3.0/wx/strconv.h|251|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|251|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|251|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF7’|
/usr/include/wx-3.0/wx/strconv.h|341|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|341|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|341|error: expected ‘,’ or ‘;’ before ‘wxMBConvStrictUTF8’|
/usr/include/wx-3.0/wx/strconv.h|360|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|360|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|360|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF8’|
/usr/include/wx-3.0/wx/strconv.h|393|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|393|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|393|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16Base’|
/usr/include/wx-3.0/wx/strconv.h|412|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|412|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|412|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16LE’|
/usr/include/wx-3.0/wx/strconv.h|426|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|426|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|426|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16BE’|
/usr/include/wx-3.0/wx/strconv.h|440|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|440|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|440|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32Base’|
/usr/include/wx-3.0/wx/strconv.h|458|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|458|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|458|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32LE’|
/usr/include/wx-3.0/wx/strconv.h|472|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|472|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|472|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32BE’|
/usr/include/wx-3.0/wx/strconv.h|488|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|488|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|488|error: expected ‘,’ or ‘;’ before ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|576|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|576|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|576|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|580|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|580|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|580|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|583|error: unknown type name ‘wxMBConvStrictUTF8’|
/usr/include/wx-3.0/wx/strconv.h|583|error: unknown type name ‘wxMBConvStrictUTF8’|
/usr/include/wx-3.0/wx/strconv.h|583|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|586|error: unknown type name ‘wxMBConvUTF7’|
/usr/include/wx-3.0/wx/strconv.h|586|error: unknown type name ‘wxMBConvUTF7’|
/usr/include/wx-3.0/wx/strconv.h|586|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|596|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|603|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|606|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|606|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|606|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|613|error: unknown type name ‘wxMBConv’|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 27 warning(s) (0 minute(s), 0 second(s)) ===|
||warning: ./wx_pch.h.gch/Debug_wx_pch_h_gch: not for GNU C [enabled by default]|
/usr/include/wx-3.0/wx/buffer.h|19|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|27|error: unknown type name ‘namespace’|
/usr/include/wx-3.0/wx/buffer.h|28|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token|
/usr/include/wx-3.0/wx/buffer.h|65|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|241|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|242|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|246|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|360|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|360|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token|
/usr/include/wx-3.0/wx/buffer.h|380|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|380|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token|
/usr/include/wx-3.0/wx/buffer.h|398|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|416|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|417|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token|
/usr/include/wx-3.0/wx/buffer.h|446|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|447|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token|
/usr/include/wx-3.0/wx/buffer.h|518|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/buffer.h|519|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token|
/usr/include/wx-3.0/wx/strconv.h|29|error: unknown type name ‘class’|
/usr/include/wx-3.0/wx/strconv.h|47|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|47|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|47|error: expected ‘,’ or ‘;’ before ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|183|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|183|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|183|error: expected ‘,’ or ‘;’ before ‘wxMBConvLibc’|
/usr/include/wx-3.0/wx/strconv.h|205|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|205|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|205|error: expected ‘,’ or ‘;’ before ‘wxConvBrokenFileNames’|
/usr/include/wx-3.0/wx/strconv.h|251|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|251|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|251|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF7’|
/usr/include/wx-3.0/wx/strconv.h|341|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|341|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|341|error: expected ‘,’ or ‘;’ before ‘wxMBConvStrictUTF8’|
/usr/include/wx-3.0/wx/strconv.h|360|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|360|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|360|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF8’|
/usr/include/wx-3.0/wx/strconv.h|393|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|393|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|393|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16Base’|
/usr/include/wx-3.0/wx/strconv.h|412|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|412|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|412|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16LE’|
/usr/include/wx-3.0/wx/strconv.h|426|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|426|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|426|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16BE’|
/usr/include/wx-3.0/wx/strconv.h|440|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|440|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|440|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32Base’|
/usr/include/wx-3.0/wx/strconv.h|458|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|458|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|458|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32LE’|
/usr/include/wx-3.0/wx/strconv.h|472|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|472|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|472|error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32BE’|
/usr/include/wx-3.0/wx/strconv.h|488|warning: data definition has no type or storage class [enabled by default]|
/usr/include/wx-3.0/wx/strconv.h|488|warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]|
/usr/include/wx-3.0/wx/strconv.h|488|error: expected ‘,’ or ‘;’ before ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|576|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|576|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|576|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|580|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|580|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|580|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|583|error: unknown type name ‘wxMBConvStrictUTF8’|
/usr/include/wx-3.0/wx/strconv.h|583|error: unknown type name ‘wxMBConvStrictUTF8’|
/usr/include/wx-3.0/wx/strconv.h|583|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|586|error: unknown type name ‘wxMBConvUTF7’|
/usr/include/wx-3.0/wx/strconv.h|586|error: unknown type name ‘wxMBConvUTF7’|
/usr/include/wx-3.0/wx/strconv.h|586|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|596|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|603|error: unknown type name ‘wxMBConv’|
/usr/include/wx-3.0/wx/strconv.h|606|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|606|error: unknown type name ‘wxCSConv’|
/usr/include/wx-3.0/wx/strconv.h|606|error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token|
/usr/include/wx-3.0/wx/strconv.h|613|error: unknown type name ‘wxMBConv’|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build failed: 50 error(s), 27 warning(s) (0 minute(s), 0 second(s)) ===|
These errors occur when I select Build | Compile current file.
This also happens if I start a fresh wxSmith project, and do nothing except add the sqlite3 files.
However, if I open the wx/samples/mdi project in Code::Blocks, I can add sqlite3 and it compiles without complaint.
I have therefore concluded that there is something going on with wxSmith that is getting in the way. The trouble is, what is the problem and is there something I can do to alleviate it?
I posted this question in the wxWidgets Programming Forums, Compiler/Linking/IDE Related, but my issue appears to be pretty specific to Code::Blocks and wxSmith.
Thanks for any help you can give me.