🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
IPicture
I tried using the NeHe IPicture code and I got the error:
74 C:\Dev-Cpp\Examples\nehe_ipicture\NeHe_IPicture\NeHe_IPicture.cpp
`OleLoadPicturePath' undeclared (first use this function)
Even though I included the olectl.h and all the libraries with ole..:)
What could the problem be?
Thanks.
That's very odd, I just made a new Dev-Cpp console project and added in the IPicture files and the only initial errors I got were linker errors. I added in the default windows libs needed for a Win32 devcpp project and it worked perfect! I'm not sure why you project isn't working, but I've uploaded the one I just made here, so you can try opening that in Dev and recompile it (ctrl + F11). If it works, then you can check against yours. If it doesn't, then there's a big problem! Good luck [smile]
I unzipped the project and pressed the "compile" button and I got the same error?! Do you think that there's a problem with my header file? (olectl.h)
I looked at the header filr and couldn't find the OleLoadPicturePath? At the end of the filr there was:
STDAPI DllRegisterServer(void);
STDAPI DllUnregisterServer(void);
STDAPI OleCreateFontIndirect(LPFONTDESC,REFIID,PVOID*);
STDAPI OleCreatePictureIndirect(LPPICTDESC,REFIID,BOOL,PVOID*);
STDAPI OleCreatePropertyFrame(HWND,UINT,UINT,LPCOLESTR,ULONG,LPUNKNOWN*,ULONG,LPCLSID,LCID,DWORD,PVOID);
STDAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS);
STDAPI_(HCURSOR) OleIconToCursor(HINSTANCE,HICON);
STDAPI OleLoadPicture(LPSTREAM,LONG,BOOL,REFIID,PVOID*);
STDAPI OleTranslateColor(OLE_COLOR,HPALETTE,COLORREF*);
There's a LoadPicture but no LoadPicturePath, could that be the problem? Or maybe I need a certain dll? but that would give a different error I think.
Thanks.
I looked at the header filr and couldn't find the OleLoadPicturePath? At the end of the filr there was:
STDAPI DllRegisterServer(void);
STDAPI DllUnregisterServer(void);
STDAPI OleCreateFontIndirect(LPFONTDESC,REFIID,PVOID*);
STDAPI OleCreatePictureIndirect(LPPICTDESC,REFIID,BOOL,PVOID*);
STDAPI OleCreatePropertyFrame(HWND,UINT,UINT,LPCOLESTR,ULONG,LPUNKNOWN*,ULONG,LPCLSID,LCID,DWORD,PVOID);
STDAPI OleCreatePropertyFrameIndirect(LPOCPFIPARAMS);
STDAPI_(HCURSOR) OleIconToCursor(HINSTANCE,HICON);
STDAPI OleLoadPicture(LPSTREAM,LONG,BOOL,REFIID,PVOID*);
STDAPI OleTranslateColor(OLE_COLOR,HPALETTE,COLORREF*);
There's a LoadPicture but no LoadPicturePath, could that be the problem? Or maybe I need a certain dll? but that would give a different error I think.
Thanks.
Yea, there has to be something wrong with your files. If you can, redownload the latest DevCpp. Uninstall your old one first (save any project files you store in that directory before deleting it), then reinstall it. That should hopefully do the trick, all the files I was using come with DevCpp. Make sure you install it to C;/Dev-Cpp or some C:/ root folder that does not contain any spaces (no program files for example). See how that goes then you can report back.
Just to make sure, lets say I have a folder DevC++ and in it a folder MyStuff, if I uninstall Dev will all MyStuff get erased? (there lot of stuff)
Thanks.
Thanks.
Well, not sure exactly, it shouldn't, but it's always good to move your files and not trust software. Ever. [grin]
I tried deleteing the Dev-Cpp folder after doing the uninstall but it kept saying that I didn't have access to delete it?
Hm, odd, try restarting your computer, some file has a lock on that directory still. If you still can't it's ok, just install to Dev-Cpp2 and it should be fine.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement