Hey, this is probably really simple to fix since I'm relatively inexperienced, but I just cannot manage to find any solutions in the forums, through google, or anything.
So I'm trying to use the CImg library and intellisense isn't working for any of the CImg classes. I've added CImg.h to the solution (CImg.h is in the same folder as the main function's .cpp file) and even if I copy and paste really simple examples, such as the one found here (http://cimg.sourceforge.net/reference/group__cimg__tutorial.html), intellisense doesn't work.
Furthermore, when I compile, I get the following debug error with the abort, retry, or ignore options:
"This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."
And in the command line, I get the following ouput:
Invalid Parameter - "C:\Users\Kevin\AppData\Local\Temp\xju5HLyG.pnm"
'gm.exe' is not recognized as an internal or external command,
operable program or batch file.
Invalid Parameter - "C:\Users\Kevin\AppData\Local\Temp\0bSNAR5f.pnm"
'gm.exe' is not recognized as an internal or external command,
operable program or batch file.
Invalid Parameter - "C:\Users\Kevin\AppData\Local\Temp\HC8vbH01.pnm"
'gm.exe' is not recognized as an internal or external command,
operable program or batch file.
Another example, pg. 3 of this pdf http://www.math.ucla.edu/~wittman/hyper/vick/Cimg_tutorial.pdf, won't compile. I don't doubt that this may be stemming from the same problem. Here's the code exactly as I have copied it:
#include "CImg.h"
using namespace cimg_libary;
int main(){
CImg<double> image("starwars.bmp");
CImgDisplay main_disp(image,"Image",0);
CImg<double> darkimage(image.dimx(),image.dimy(),1,3,0);
for(int i=0;i<image.dimx();i++)
for(int j=0;j<image.dimy();j++)
for(int k=0;k<3;k++)
darkimage(i,j,0,k) = image(i,j,0,k)/2;
CImgDisplay dark_disp(darkimage,"Dark Image",0);
while(!main_disp.is_closed())
main_disp.wait();
return 0;
}
And here are the errors:
main.cpp(2) : error C2871: 'cimg_libary' : a namespace with this name does not exist
main.cpp(11) : error C2065: 'CImg' : undeclared identifier
main.cpp(11) : error C2062: type 'double' unexpected
main.cpp(12) : error C2065: 'CImgDisplay' : undeclared identifier
main.cpp(12) : error C2146: syntax error : missing ';' before identifier 'main_disp'
main.cpp(12) : error C2065: 'image' : undeclared identifier
main.cpp(12) : error C3861: 'main_disp': identifier not found
main.cpp(13) : error C2065: 'CImg' : undeclared identifier
main.cpp(13) : error C2062: type 'double' unexpected
main.cpp(15) : error C2065: 'image' : undeclared identifier
main.cpp(15) : error C2228: left of '.dimx' must have class/struct/union, type is ''unknown-type''
main.cpp(16) : error C2065: 'image' : undeclared identifier
main.cpp(16) : error C2228: left of '.dimy' must have class/struct/union, type is ''unknown-type''
main.cpp(18) : error C3861: 'darkimage': identifier not found
main.cpp(18) : error C3861: 'image': identifier not found
main.cpp(20) : error C2065: 'CImgDisplay' : undeclared identifier
main.cpp(20) : error C2146: syntax error : missing ';' before identifier 'dark_disp'
main.cpp(20) : error C2065: 'darkimage' : undeclared identifier
main.cpp(20) : error C3861: 'dark_disp': identifier not found
main.cpp(21) : error C2065: 'main_disp' : undeclared identifier
main.cpp(21) : error C2228: left of '.is_closed' must have class/struct/union, type is ''unknown-type''
main.cpp(21) : fatal error C1903: unable to recover from previous error(s); stopping compilation
I wrote an arbitrary struct to check if intellisense was only not working with the CImg stuff and it did work with the struct, so I'm assuming I'm doing something wrong or not doing something I need to do in order to include the CImg header appropriately. The most annoying thing is that this grad student I knew sent me a project he was working on to look at and it uses the CImg library as well and the intellisense works for it in his project, but I tried scouring his includes and macros and project settings to try to figure out what he did differently, and I couldn't. So, yeah, it's probably something dumb, but I'm so tired of it so any help would be greatly appreciated!
Also, if you think this belongs in a different forum, let me know and I'll move it.
Thanks,
-Kevin