Is this weird? Too me it is...Cant Compile Win32/DX prj(s)
So recently I re-formatted my computer. This is due to the fact that everytime i turned on my computer... it'd go straight to the BSOD (Blue Screen of Death).
So i went and downloaded Visual C++ 2005 Express Edition. I would install the Visual Studio 2005 but as my dad and i arent on speaking terms right now.... i cant exactly do that.
After installing V++ 2005 Ex Ed. I went and tried to create a Win32 Project....Its then i relized i didnt have a Win32 Application Project Option...
I searched around for a solution to this, because before my re-format, i could and was creating Win32 Applications... and found out what to do, at this site, http://msdn.microsoft.com/vstudio/ex...alc/usingpsdk/.
Funny thing is... i remember creating Win32 Windows Applications.Before even installing the PlatForm SDK....
I installed (Microsoft ® Windows Server® 2003 R2 Platform SDK Web Install)
But sadly... They didnt work. Which is funny, Because again prior to the re-format.I could build the project from those sites.As they were my main source of learning Win32 Application coding.
This is the site and project name of the first project i tried.Aswell as the errors.
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\***\main.cpp(12) : error C2664: 'GetDlgItemTextW' : cannot convert parameter 3 from 'char [256]' to 'LPWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\***\main.cpp(13) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'char [256]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\***\main.cpp(34) : error C2440: '=' : cannot convert from 'const char [4]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\***\main.cpp(45) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [4]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\***\main.cpp(51) : 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\hp_owner\my documents\visual studio 2005\projects\***\main.cpp(57) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [5]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\***\main.cpp(63) : 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
Then i decided to try out DirectX too see if it'd work. So i downloaded and installed DirectXSDK (August 2006) and proceeded to create a project thru win32.
So I Selected Win32 Console App. checked empty project and selected Windows Application.
I linked my lib's : d3dxof.lib dxguid.lib d3dx9d.lib d3d9.lib winmm.lib
I also Tried: d3dxof.lib dxguid.lib d3dx9d.lib d3d9.lib winmm.lib
Site:http://gameprogrammer.org/
http://gameprogrammer.org/main.php?page=tutorials&no=8[/url]
Project:Beginning Direct3D
Type of Project your building: Basic DirectX Enabled Window.
And because its a DX8 Project i changed things DX9.Which last time i did... worked....
Error Message(s):
VB Code:
Compiling...
winmain.cpp
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\dx9test\winmain.cpp(30) : error C2440: '=' : cannot convert from 'const char [6]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\dx9test\winmain.cpp(41) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [6]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Now here's the real Kicker.... The Default Win32 Windows Application that the IDE creates as a default works perfectly... and so does the DirectX Examples from the Sample App that comes with the SDK.
Then i went and copied the source code from a book i had on DirectX
(Programming Role Playing Games with DirectX Second Edition - Jim Adams)
Which has all examples created in VC++ 6. But i has always been able to compile them before after i "re-built" them in VC++ 2005 Ex Ed IDE.
And i when i went to compile I got all these errors:
VB Code:
Compiling...
WinMain.cpp
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\alpha\winmain.cpp(68) : error C2440: '=' : cannot convert from 'char [11]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\alpha\winmain.cpp(78) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'char [11]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\alpha\winmain.cpp(102) : error C2664: 'UnregisterClassW' : cannot convert parameter 1 from 'char [11]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\alpha\winmain.cpp(104) : warning C4244: 'return' : conversion from 'WPARAM' to 'int', possible loss of data
c:\documents and settings\hp_owner\my documents\visual studio 2005\projects\alpha\winmain.cpp(117) : warning C4244: 'return' : conversion from 'LRESULT' to 'long', possible loss of data
Could someone please help me fix this problem... Would this all be fixed if i installed VS2005?
Am i simply not including something? Did i not install the correct things?
I just find it funny that The DirectX Eamples that Come With the DirectX SDK......... work on compiling by my hands.Unlike before where they'de give me errors. And yet the books code that used to work... doesnt....
Attached is the "books example".Untouched.
Also you may note that i DO NOT WANT to create Managed DirectX app's.
I just find it "f***ed up" that i cant do what i used to do before the re-format.
--------------------Edit------------------
I'll update with new progress.
I found my Book mentioned above and have started to read it to see if i need to do anything else.
---
My Biggest concern is whether or not i should/may-have-to do another re-format.And then Re-Install the PlatformSDK/DXSDK.
Its not a big deal to me tho.I would do a system restore... but idk how nor have i ever done one.
Now i say "re-format"/"system restore" instead of "uninstalling" the SDK's...
because again....idk how and i keep remembering that you "cant".For some odd reason...
----
Converting the projects seem to work.....for the bookCode
Last edited by PlaGuE; Oct 2nd, 2006 at 06:33 PM.
Without balance, there could only be chaos.
Without chaos, there could be no balance.
I live with karma. Eat with destiny. Dream of life without shackles....
Yet. If life had no consequences, life could not exist, nor could it flourish.
If at first you dont succeed.You're screwed.
C++/Java NOOB.
I aint a professional at PHP, but if i can help i will.