Author Topic: A lot of problems with DirectX 9 Apps  (Read 1578 times)

Offline Chachii

  • Single posting newcomer
  • *
  • Posts: 2
A lot of problems with DirectX 9 Apps
« on: December 16, 2014, 11:33:32 pm »
I'm running Windows 7 64 bit OST, using a custom "extension" to the Visual Studio 2010 compiler (I'm using the same settings as the VS2010 Compilier, just I added new directories for DirectX features)

Compiler Settings:
http://puu.sh/dxALr/a0408ab788.png

Code for the file I'm working with that has the error:
http://pastebin.com/06xv938x

The errors I get are:
Code: [Select]
C:\Users\Chachii\Documents\C++\HitlersRevenge\Assets\Windows.cpp(58) : error C2731: 'wWinMain' : function cannot be overloaded
        C:\Users\Chachii\Documents\C++\HitlersRevenge\Assets\Windows.cpp(57) : see declaration of 'wWinMain'
C:\Users\Chachii\Documents\C++\HitlersRevenge\Assets\Windows.cpp(71) : error C2440: 'initializing' : cannot convert from 'const wchar_t [10]' to 'LPCSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
C:\Users\Chachii\Documents\C++\HitlersRevenge\Assets\Windows.cpp(120) : error C2664: 'UnregisterClassA' : cannot convert parameter 1 from 'const wchar_t [10]' to 'LPCSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

I've tried a lot of things.  Setting the Debugger to Console/GUI, various other methods of creating a DX9 Window, etc.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12898
    • Travis build status
Re: A lot of problems with DirectX 9 Apps
« Reply #1 on: December 17, 2014, 12:46:22 am »
Do you have UNICODE or _UNICODE defined?
Why are you using UnregisterClass instead of UnregisterClassW?

Consider reading this http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F and other FAQ entries... search the internet for similar errors, etc.

And finally - This question is hardly related to C::B, so the topic might be locked, because you're violating the rules.

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]