well...i was using Tiny C compiler, now i have installed Mingw with gcc 3.4.5
i have some program where i process images...and print some info.. program compiled fine...but it did not print anything when i compiled it with gcc! very strange...
take a look at the first line in main function... strange thing is.. when i decided to print this word - "something", then all the other info printed successfullybut when i remove the printing of this word...nothing else prints in the program..
why does the gcc behaves like that on my first run? :P
Code:#define snapd(expr) printf(#expr " = %d\n", expr); int main (int argc, char *argv[]) { printf("something"); FILE *imsnap = fopen(FILE2, "w"); FILEHEADER imageheader; INFOHEADER imageinfo; RGBDATA *picture; long i,j; picture = LoadBmp(&imageheader, &imageinfo, FILE1); DrawText(&imageinfo, picture, "ABC", 100, 100, 255,255,0); SaveBmp(picture, &imageheader, &imageinfo, FILE3); //saving the RGB data and its index to the separate text file for information for (j = 0; j <= imageinfo.bwidth * imageinfo.bheight - 1; j++) { fprintf(imsnap, "%d ", (picture+j)->red); fprintf(imsnap, "%d ", (picture+j)->green); fprintf(imsnap, "%d\t%d\n", (picture+j)->blue, j); } /**/ snapd(imageheader.htype); snapd(imageheader.hsize); snapd(imageheader.hreserved1); snapd(imageheader.hreserved2); snapd(imageheader.hoffsetbits); snapd(imageinfo.bsize); snapd(imageinfo.bwidth); snapd(imageinfo.bheight); snapd(imageinfo.bplanes); snapd(imageinfo.bbitcount); snapd(imageinfo.bcompression); snapd(imageinfo.bimagesize); snapd(imageinfo.bxpermeter); snapd(imageinfo.bypermeter); snapd(imageinfo.bclrused); snapd(imageinfo.bclrimportant); free(picture); fclose(imsnap); return 0; }



LinkBack URL
About LinkBacks
but when i remove the printing of this word...nothing else prints in the program.. 



