User forums > Help
Bad stdio.h or something with SDL?
sasq:
Greetz.
I would to compile SDL template from Code::Blocks 1.0 rc2 with bundled MinGW and I have some strange errors:
--- Code: ---mingw32-g++.exe -pedantic -ID:\CBlocks\include -c main.cpp -o .objs\main.o
In file included from D:/CBlocks/include/SDL/SDL_main.h:59,
from D:/CBlocks/include/SDL/SDL.h:33,
from main.cpp:2
D:/CBlocks/include/SDL/SDL_types.h:64: error: ISO C++ does not support `long long'
--- End code ---
etc. All according to 'long long' type [is there this type in ANY C/C++ language dialect? :| ]
The errors looks like they comes from stdio.h, so I have done another test: compiled simple console app:
--- Code: ---#include <stdio.h>
int main() { }
--- End code ---
and i get the same errors. Is that possible that stdio.h bundled with Code::Blocks is scr3w3d? :|
I don't remember that there was the same errors with stdio.h under previous Code::Blocks releases, I'll check this after a while..
BTW I have a proposition to allow copying selected text possibility in build and compiler logs windows [small improvement ;) ]
Urxae:
--- Quote from: sasq on November 23, 2005, 10:38:48 pm ---Greetz.
I would to compile SDL template from Code::Blocks 1.0 rc2 with bundled MinGW and I have some strange errors:
--- Code: ---mingw32-g++.exe -pedantic -ID:\CBlocks\include -c main.cpp -o .objs\main.o
In file included from D:/CBlocks/include/SDL/SDL_main.h:59,
from D:/CBlocks/include/SDL/SDL.h:33,
from main.cpp:2
D:/CBlocks/include/SDL/SDL_types.h:64: error: ISO C++ does not support `long long'
--- End code ---
etc. All according to 'long long' type [is there this type in ANY C/C++ language dialect? :| ]
--- End quote ---
Yes, long long s both in C99 and in the GNU C++ dialect. However, you're compiling C++ source files (so no C99) with -pedantic specified (so no GNU extensions). Either rename your source to main.c and continue in C (wouldn't reccomend it ;)) or remove -pedantic from the compiler options. That should fix it.
--- Quote ---BTW I have a proposition to allow copying selected text possibility in build and compiler logs windows [small improvement ;) ]
--- End quote ---
Known bug: Ctrl+C doesn't work, but right-click -> Copy does.
sasq:
This means that I can't compile code using SDL as ISO C++ Standard compliant?
Not good :\
But thanks for answer, it really helped.
BTW Maybe it's a bug also, but under Win2000 Professional I have black rectangular areas in many icons in Code::Blocks. In earlier versions they're isn't there.
And another proposition: it would be nice looking if toolbars were "flat-style" ;) and without additional disturbing frames around. Is it possible to do?
Urxae:
--- Quote from: sasq on November 24, 2005, 01:14:16 am ---This means that I can't compile code using SDL as ISO C++ Standard compliant?
Not good :\
But thanks for answer, it really helped.
--- End quote ---
Pretty much, but only because it uses long long which isn't in the ISO C++ Standard. This basically happened because C++ was standardized in '98, but the latest C standard (which added long long) was published in '99. The C++ standard is therefoer based on an older version of C ('89 I think, not sure).
The next version of C++ will be based on C99 (or later) and will probably include long long. Should be out any decade now ;).
--- Quote ---BTW Maybe it's a bug also, but under Win2000 Professional I have black rectangular areas in many icons in Code::Blocks. In earlier versions they're isn't there.
--- End quote ---
This indeed happens only on Win2k. It seems it doesn't handle alpha (partial) transparency all that well, and those icons use alpha. The fix is pretty simple though: use non-alpha-using icons ;). Since I'm also using Win2k I even have them right here. Open the attachment to this post and unzip to ${CB_DIR}\share\CodeBlocks\images (overwrite all, of course). Restart Code::Blocks and presto :D.
They're not as pretty as the normal icons on platforms without this problem, so that's why they aren't used by default. Though there was some talk about the installer including both sets and installing this one on Win2k a while back, don't know what became of that.
--- Quote ---And another proposition: it would be nice looking if toolbars were "flat-style" ;) and without additional disturbing frames around. Is it possible to do?
--- End quote ---
I think someone mentioned this isn't possible with wxDockIt (the library that currently provides the toolbars) last time this was asked.
[attachment deleted by admin]
takeshimiya:
Yeah I remember that talk, it was rick saying "well, anyone wanting to do the icons without alpha send me..."
Note that every icon (in 16x16, 24x24) and even the application icon must don't have alpha.
Navigation
[0] Message Index
[#] Next page
Go to full version