DevIL in VC++ Express

Started by
0 comments, last by jouley 17 years, 3 months ago
Okay, I've gone through all the standard steps to add the libs, bins, & includes of DevIL into VC++. Also added the lib requirements in the project file. As for the code, I'm using the DevIL version of NeHe's Lesson 6. However, when I go to compile, it gives me the following error:
Quote: c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(42) : error C2664: 'ilLoadImage' : cannot convert parameter 1 from 'const char [14]' to 'const wchar_t *' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(152) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [29]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(157) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [34]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(164) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [31]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(170) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [24]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(174) : error C2664: 'UnregisterClassW' : cannot convert parameter 1 from 'const char [7]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(176) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [28]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(212) : error C2440: '=' : cannot convert from 'const char [7]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(216) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [37]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(234) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [94]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(241) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [24]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(274) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [7]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(277) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(306) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [34]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(313) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [35]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(320) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [27]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(327) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [37]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(334) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [41]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(346) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [23]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(423) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [42]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\n00body\desktop\lesson06\lesson06\lesson6.cpp(476) : warning C4244: 'return' : conversion from 'WPARAM' to 'int', possible loss of data Build log was saved at "file://c:\Documents and Settings\n00body\My Documents\Visual Studio 2005\Projects\DevIL\SDL OpenGL DevIL\Debug\BuildLog.htm" SDL OpenGL DevIL - 20 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Any ideas on how to resolve these?

[Hardware:] Falcon Northwest Tiki, Windows 7, Nvidia Geforce GTX 970

[Websites:] Development Blog | LinkedIn
[Unity3D :] Alloy Physical Shader Framework

Advertisement
Check this out. Your project is probably set to a Unicode build setup. The fix? Here's a useful thread, with a gem of an explanation by Emmanuel Deloget a few posts down, and another at the very end.

-jouley

P.S. - Sorry it came to switching compilers to get DevIL up and running, but I think you'll be happier in the end.

This topic is closed to new replies.

Advertisement