Which header contains the constants it gives the error about? Make sure it is included in that file.
- Alon On Fri, Mar 21, 2014 at 10:01 AM, colombian developers <[email protected] > wrote: > Hello my project show "unknown type name" error > > > > but this variables exists (region and pixelformat) in respective header > files.. is possible a error in compiler LLVM ? > > > the same project in windows with gcc compiles OK in a executable... > > > my project to test .... with compilar.bat > https://www.mediafire.com/?4dtudu6hb5wab1k > > > > thanks .. > > > > =============================== CONSOLE OUTPUT > ======================================== > C:\html5\bennugd>compilar > > C:\html5\bennugd>emcc main.c core/bgdrtm/src/copy.c > core/bgdrtm/src/dcbr.c > core/bgdrtm/src/dirs.c core/bgdrtm/src/fmath.c > core/bgdrtm/src/instance.c cor > e/bgdrtm/src/interpreter.c core/bgdrtm/src/misc.c > core/bgdrtm/src/strings.c co > re/bgdrtm/src/sysprocs.c core/bgdrtm/src/varspace_file.c > core/common/deb > ug.c core/common/files.c core/common/xctype.c > modules/libgrba > se/g_bitmap.c modules/libgrbase/g_blendop.c modules/libgrbase/g_clear.c > module > s/libgrbase/g_conversion.c modules/libgrbase/g_grlib.c > modules/libgrbase/g_pal.c > modules/libgrbase/libgrbase.c modules/libvideo/g_video.c > modules/libv > ideo/g_regions.c modules/librender/g_fade.c > modules/librender/g_frame.c > modules/librender/g_instance.c modules/librender/g_object.c > modules/librender/g > _rects.c modules/librender/g_screen.c modules/librender/librender.c > modules/libr > ender/scaler_hq2x.c modules/librender/scaler_normal.c > modules/librender/scaler_s > cale2x.c modules/librender/scaler_scanline.c -o index.html > -Icore/bgdi/inclu > de -Icore/include -Icore/bgdrtm/include -Icore/bgdc/include > -Imodules/libgrba > se -Imodules/libvideo -Imodules/librender -D__STATIC__ > INFO root: (Emscripten: Running sanity checks) > core/bgdrtm/src/dcbr.c:189:31: warning: passing 'const char *' to > parameter of > type 'char *' discards qualifiers [-Wincompatible-pointer-types] > return dcb_load_from( fp, filename, 0 ); > ^~~~~~~~ > core/bgdrtm/include\bgdrtm.h:79:45: note: passing argument to parameter > 'dcbname' here > extern int dcb_load_from( file * fp, char * dcbname, int offset ) ; > ^ > 1 warning generated. > core/bgdrtm/src/sysprocs.c:458:21: warning: format string is not a string > literal (potentially insecure) [-Wformat-security] > printf( dliberror() ) ; > ^~~~~~~~~~~ > 1 warning generated. > core/common/xctype.c:157:43: warning: illegal character encoding in string > literal [-Winvalid-source-encoding] > ...((const unsigned char *)"<E1><E9><ED><F3><FA><F1><D1><E7><C7><E0>... > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > core/common/xctype.c:158:68: warning: illegal character encoding in string > literal [-Winvalid-source-encoding] > ...(const unsigned char *)"AEIOUNNCCAEIOUAEIOUYAEIOU<C6>AAOAEIOU") ; > ^~~~ > core/common/xctype.c:159:43: warning: illegal character encoding in string > literal [-Winvalid-source-encoding] > ...((const unsigned char *)"<E1><E9><ED><F3><FA><F1><D1><E7><C7><E0>... > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > core/common/xctype.c:160:68: warning: illegal character encoding in string > literal [-Winvalid-source-encoding] > ...(const unsigned char *)"aeiounnccaeiouaeiouyaeiou<C6>aaoaeiou") ; > ^~~~ > core/common/xctype.c:173:42: warning: illegal character encoding in string > literal [-Winvalid-source-encoding] > ...((const unsigned char *)"<E1><E9><ED><F3><FA><C1><C9><CD><D3><DA>... > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > core/common/xctype.c:174:19: warning: illegal character encoding in string > literal [-Winvalid-source-encoding] > "<E6><C6><E3><E5><F0><F5><AA><BA><C3><C5><D0><D5><D8>",... > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 6 warnings generated. > modules/libgrbase/g_bitmap.c:274:16: warning: comparison of unsigned > expression > < 0 is always false [-Wtautological-compare] > if ( point < 0 ) return ; > ~~~~~ ^ ~ > modules/libgrbase/g_bitmap.c:347:24: warning: comparison of unsigned > expression > >= 0 is always true [-Wtautological-compare] > if ( x >= 0 ) break; > ~ ^ ~ > modules/libgrbase/g_bitmap.c:359:24: warning: comparison of unsigned > expression > >= 0 is always true [-Wtautological-compare] > if ( x >= 0 ) break; > ~ ^ ~ > modules/libgrbase/g_bitmap.c:364:12: warning: comparison of unsigned > expression > < 0 is always false [-Wtautological-compare] > if ( y < 0 ) bitmap->info_flags |= GI_NOCOLORKEY ; > ~ ^ ~ > 4 warnings generated. > In file included from modules/librender/g_fade.c:32: > In file included from modules/librender/librender.h:48: > In file included from modules/librender/g_instance.h:33: > In file included from modules/libgrbase\g_bitmap.h:32: > modules/libgrbase/g_pal.h:104:18: error: unknown type name 'PIXEL_FORMAT' > extern int _rgb( PIXEL_FORMAT * format, int r, int g, int b ); > ^ > modules/libgrbase/g_pal.h:105:19: error: unknown type name 'PIXEL_FORMAT' > extern int _rgba( PIXEL_FORMAT * format, int r, int g, int b, int a ); > ^ > modules/libgrbase/g_pal.h:106:16: error: unknown type name 'PIXEL_FORMAT' > void _get_rgb( PIXEL_FORMAT * format, int color, int *r, int *g, int *b ); > ^ > modules/libgrbase/g_pal.h:107:17: error: unknown type name 'PIXEL_FORMAT' > void _get_rgba( PIXEL_FORMAT * format, int color, int *r, int *g, int... > ^ > In file included from modules/librender/g_fade.c:32: > In file included from modules/librender/librender.h:48: > modules/librender/g_instance.h:35:58: error: unknown type name 'REGION' > extern void instance_get_bbox( INSTANCE * i, GRAPH * gr, REGION * dest ); > ^ > modules/librender/g_instance.h:36:45: error: unknown type name 'REGION' > extern void draw_instance_at( INSTANCE * i, REGION * r, int x, int y,... > ^ > modules/librender/g_instance.h:37:42: error: unknown type name 'REGION' > extern void draw_instance( INSTANCE * i, REGION * clip ) ; > ^ > In file included from modules/librender/g_fade.c:32: > In file included from modules/librender/librender.h:49: > modules/librender/g_object.h:32:40: error: unknown type name 'REGION' > typedef int ( OBJ_INFO )( void * what, REGION * clip, int * key, int * > ready ); > ^ > modules/librender/g_object.h:33:41: error: unknown type name 'REGION' > typedef void ( OBJ_DRAW )( void * what, REGION * clip ); > ^ > modules/librender/g_object.h:43:5: error: unknown type name 'REGION' > REGION bbox ; > ^ > modules/librender/g_object.h:44:5: error: unknown type name 'REGION' > REGION bbox_saved ; > ^ > modules/librender/g_object.h:75:30: error: unknown type name 'REGION' > extern void gr_draw_objects( REGION * updaterects, int count ) ; > ^ > In file included from modules/librender/g_fade.c:32: > In file included from modules/librender/librender.h:50: > modules/librender/g_rects.h:36:20: error: unknown type name 'REGION' > int gr_mark_rects( REGION * rects ) ; > ^ > modules/librender/g_fade.c:53:11: error: use of undeclared identifier > 'screen'; > did you mean 'strlen'? > if ( !screen ) return ; > ^~~~~~ > strlen > C:\html5\Emscripten182\emscripten\1.8.2\system\include\libc\string.h:48:8: > note: > > 'strlen' declared here > size_t strlen (const char *); > ^ > modules/librender/g_fade.c:55:11: error: use of undeclared identifier > 'sys_pixel_format' > if (( sys_pixel_format ) && ( sys_pixel_format->palette ) ) > ^ > modules/librender/g_fade.c:55:35: error: use of undeclared identifier > 'sys_pixel_format' > if (( sys_pixel_format ) && ( sys_pixel_format->palette ) ) > ^ > modules/librender/g_fade.c:57:14: error: use of undeclared identifier > 'sys_pixel_format' > if ( sys_pixel_format->depth > 8 ) > ^ > modules/librender/g_fade.c:60:17: error: use of undeclared identifier > 'sys_pixel_format' > sys_pixel_format->palette->colorequiv[ n ] = SDL_MapRGB(... > ^ > modules/librender/g_fade.c:60:74: error: use of undeclared identifier > 'screen'; > did you mean 'strlen'? > ...n ] = SDL_MapRGB( screen->format, sys_pixel_format->palette->rgb[ n > ].r,... > > ^~~~~~ > strlen > C:\html5\Emscripten182\emscripten\1.8.2\system\include\libc\string.h:48:8: > note: > > 'strlen' declared here > size_t strlen (const char *); > ^ > fatal error: too many errors emitted, stopping now [-ferror-limit=] > 20 errors generated. > ERROR root: compiler frontend failed to generate LLVM bitcode, halting > > C:\html5\bennugd> > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
