|
From: Paul G. <pga...@te...> - 2000-11-30 01:15:57
|
Hi folks, Playing catch up here... On 25 Nov 2000, at 4:58, the Illustrious Soren Andersen wrote: > Hello again, > > Danny from this list was kind enough to let me know that the wheel I was > re-inventing had been accomplished extensively by Paul Sokolovsky and the > jpeglib was on the mingw.org site. However, even with Paul's patch, I > cannot get the applications to compile! I am not sure which version Paul S. has posted to the site, and it may not be important...what I do know is that mingw builds libjpeg just fine from jpeg release 6b. To create .dlls is simply a matter of taking all of the .o files and placing them in the .dll. Finally, jpeg is C based, and has no relationship to C++ outside of the fact that g++ or gcc may be used to compile the libs, etc. Included with the jpeg-6b release is a set of testing utilities. This set of utilities is actually quite useful when it comes to compiling a mingw version of jpeg as they are very specific to testing the jpeg calls themselves. > > ---- console dump ---- > gcc -O2 -I. -I.. -Wundef -c ../cjpeg.c -o cjpeg.o > gcc -O2 -I. -I.. -Wundef -c ../rdppm.c -o rdppm.o > ../rdppm.c: In function `jinit_read_ppm': > ../rdppm.c:459: Internal compiler error in `rest_of_compilation', at toplev.c:4415 > Please submit a full bug report. > See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions. > make: *** [rdppm.o] Error 1 > > ---- end dump ---- > > > Here is what that code is: > > ---- code ----- > > GLOBAL(cjpeg_source_ptr) > jinit_read_ppm (j_compress_ptr cinfo) > { > ppm_source_ptr source; > > /* Create module interface object */ > source = (ppm_source_ptr) > (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, > SIZEOF(ppm_source_struct)); > > /* Fill in method ptrs, except get_pixel_rows which start_input sets */ > > source->pub.start_input = start_input_ppm; > source->pub.finish_input = finish_input_ppm; > > return (cjpeg_source_ptr) source; > > } /* LINE 459 */ > > ----- end code ---- > > ----- code from `jmorecfg.h ----- > > #if defined(_WIN32) || defined(__declspec) || !defined(STATIC) > #ifdef BUILD > #define GLOBAL(type) __declspec(dllexport) type > #define EXTERN(type) extern __declspec(dllexport) type > #else > #define GLOBAL(type) __declspec(dllimport) type > #define EXTERN(type) extern __declspec(dllimport) type > #endif > #else > /* a function referenced thru EXTERNs: */ > #define GLOBAL(type) type > /* a reference to a GLOBAL function: */ > #define EXTERN(type) extern type > #endif > > ----- end code ------ > > -- Is it that cpp macro instruction generates a parse error on my setup? > The first file compiles fine. > > IS this actually a bug in gcc cpp? You shouldn't be making any calls to g++ libs when building jpeg. If there is a problem, then it has to do with the g++ lib release you are using. I don't know if this is helpful. I can only hope that it is. Peace, Paul G. > > soren andersen > > _______________________________________________ > MinGW-users mailing list > Min...@li... > > You may change your MinGW Account Options at: > http://lists.sourceforge.net/mailman/listinfo/mingw-users > Nothing real can be threatened. Nothing unreal exists. |