Jump to content
  • Advertisement
Sign in to follow this  
n00body

DevIL in VC++ Express

This topic is 4133 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!