DavidDD 0 Newbie Poster

Hey there!

First of all I have no idea if this is the right forum but I would assume that it is... Please move/delete/something this thread if it's not placed correctly and notify me :)

Alright. Onto the problem.

I am currently in school learning C++, we are right now using CDX to program "simple" 2D games. Now my school uses older versions of Microsoft visual studios/C++. I wanted to install CDX on the 2008 version but in the book I found they use 2003/2005.

Now, when I compile I get errors that I really can not seem to fix:

c:\docendo\övningsfiler\inställningar för visual c++ 2005 
express\inställningar för visual c++ 2005 express\basecodeexpress\main.cpp(72) : error C2440: '=' : cannot convert from 'const char [9]' to 'LPCWSTR'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\docendo\övningsfiler\inställningar för visual c++ 2005 express\inställningar för visual c++ 2005 express\basecodeexpress\main.cpp(73) : error C2440: '=' : cannot convert from 'const char [9]' to 'LPCWSTR'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>c:\docendo\övningsfiler\inställningar för visual c++ 2005 express\inställningar för visual c++ 2005 express\basecodeexpress\main.cpp(88) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [9]' to 'LPCWSTR'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

Now, the problem itself is "located" in main.cpp and game.h because it doesn't like putting GAME_NAME (#defined as "Skeleton in game.h) but that returns errors as you could see...

I googled and I found out that I could change the project settings to use a multi-byte character set or just set the "Skeleton" to L"Skeleton". But that gives me even more errors!

1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>C:\Users\David\Documents\Visual Studio 2008\Projects\BLAAAAARHJ\Debug\BLAAAAARHJ.exe : fatal error LNK1120: 1 unresolved externals

If I have both multi-byte and L"Skeleton" I get the first error message.

Anyone have any idea how to solve this? This is all pre-made and works in school so it must be some 2008 compiler update mustn't it?

Help is very much appreciated!


EDIT: Actually I fixed it myself... I changed the console application setting to windows application and used multi-byte. Console in the book, windows now. That's nice