CImg Library in C++ Builder einbinden?
-
Hallo allesamt,
habe mir die CImg Library geholt und versuche nun vergeblich das tutorial-Program zum laufen zubekommen.
habe die header CImg.h includiert, die Pfade gesetzt und erhalte diese Fehlermeldungen:
[C++ Fehler] tutorial.cpp(59): E2285 Keine Übereinstimmung für 'cimg::option(char *,int,char * *,char *,char *)' gefunden
[C++ Fehler] tutorial.cpp(62): E2285 Keine Übereinstimmung für 'cimg::option(char *,int,char * *,char *,char *)' gefunden
[C++ Fehler] tutorial.cpp(65): E2285 Keine Übereinstimmung für 'cimg::option(char *,int,char * *,double,char *)' gefunden
[C++ Fehler] tutorial.cpp(117): E2285 Keine Übereinstimmung für 'CImg<unsigned char>::draw_text<tc1,tc2,t>(int,int,char *,const unsigned char *,int,int,int,volatile int,volatile int,const unsigned int,const unsigned int,const unsigned int)' gefundenWas ist das Problem? Sind es einstellungen im C++Builder?
Zu mir: bin noch Anfänger und versuche gerade mir C++ OOP mit dem C++ Builder 6 anzutrainieren.
-
Hallo
Die Fehlermeldungen sehen eher Problemen in deinem Code aus. Also bitte poste mal die relevanten Codezeilen.
bis bald
akari
-
Der Code ist nicht von mir. Es ist der Beispielcode tutorial.cpp. Ich gehe daher davon aus das dieser fehlerfrei ist, hatte zumal auch andere Beispiele probiert, da gab es auch Fehlermeldungen.
... // Display program usage, when invoked from the command line with option '-h'. cimg_usage("View the color profile of an image along the X axis"); // Read image filename from the command line (or set it to "img/parrot_original.ppm" if option '-i' is not provided). const char* file_i = cimg_option("-i",cimg_imagepath "parrot_original.ppm","Input image"); // Read pre-blurring variance from the command line (or set it to 1.0 if option '-blur' is not provided). const double sigma = cimg_option("-blur",1.0,"Variance of gaussian pre-blurring"); ... // Create and display the image of the intensity profile CImg<unsigned char>(draw_disp.dimx(),draw_disp.dimy(),1,3,255). draw_grid(-50*100.0f/image.dimx(),-50*100.0f/256,0,0,false,true,black,0.2f,0xCCCCCCCC,0xCCCCCCCC). draw_axis(0,image.dimx()-1.0f,255.0f,0.0f,black). draw_graph(image.get_shared_line(y,0,0),red,1,1,0,255,1). draw_graph(image.get_shared_line(y,0,1),green,1,1,0,255,1). draw_graph(image.get_shared_line(y,0,2),blue,1,1,0,255,1). draw_text(30,5,"Pixel (%d,%d)={%d %d %d}",black,0,1,11, main_disp.mouse_x,main_disp.mouse_y,val_red,val_green,val_blue). draw_line(xl,0,xl,draw_disp.dimy()-1,black,0.5f,hatch=cimg::rol(hatch)). display(draw_disp); ...
Alle Dateien der CImg Library sind downloadbar, im Standard Package:
-
Zumal, die zu den Fehlermeldungen assoziierten Codezeilen nicht passen. In der ersten Fehlermeldung heißt es:
... 'cimg::option(char *,int,char * *,char *,char *)' ...
und die assoziierte Codezeile:
cimg_usage("View the color profile of an image along the X axis");
.