This other guy and I are putting together a little project that compresses images. I was designing the base for it which is a mixture of Allegro and Win32 (using the allegro.h and winalleg.h header files) but I keep getting this error whenever I try to compile it:
| QUOTE |
Invalid argument [Resource error]Syntax error [Build error] [Image_compressor_private.res] Error 1 |
It happens in the System.inl file, which looks like this if it matters:
| CODE |
#ifndef ALLEGRO_SYSTEM_INL #define ALLEGRO_SYSTEM_INL
#include "allegro/debug.h"
#ifdef __cplusplus extern "C" { #endif
AL_INLINE(void, set_window_title, (AL_CONST char *name), { ASSERT(system_driver);
if (system_driver->set_window_title) system_driver->set_window_title(name); })
AL_INLINE(int, desktop_color_depth, (void), /* error on this line */ { ASSERT(system_driver);
if (system_driver->desktop_color_depth) return system_driver->desktop_color_depth(); else return 0; })
AL_INLINE(int, get_desktop_resolution, (int *width, int *height), { ASSERT(system_driver);
if (system_driver->get_desktop_resolution) return system_driver->get_desktop_resolution(width, height); else return -1; })
#ifdef __cplusplus } #endif
#endif /* ifndef ALLEGRO_SYSTEM_INL */ |
I don't know what's causing it or how to fix it. So, usual question, "What the hell is wrong?".
Thanks, and sorry for another long post.
Zipped folder containing all documents can be found
here.
It's caused by including allegro.h in the resources file. No idea why though. If you remove the includes from resourcesh.hpp and put them at the top of main.cpp it'll compile, although you still need to link to the allegro library.
I will lick your boots. I am now officially your slave. The extend of my gratitude to you knows no bounds. (JK)
Thanks a lot though. That had me stumped for hours :)
Since you totally forgot my Christmas present, I guess a boot shining would about make up for it. Or maybe you're the ghost of Christmas future and have made me realise how missed I would be if I killed myself. No? Boot shining'll be fine then :)