compile error :/ from [Writing your own C++ Trainer]

Posts 18 of 8 · Page 1 of 1
compile error :/ from [Writing your own C++ Trainer]
Hello i try to compile these trainer
http://www.mpgh.net/forum/17-tutoria...c_trainer.html

and i received these errors

Code:
1>trainer.cpp
1>..\trainer.cpp(40) : error C2664: 'strcmp' : cannot convert parameter 1 from 'WCHAR [260]' to 'const char *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
can anyone help me out?
If you post your source i'll fix it for you or is the code at that link what you're using?
yes i use from the link above.. if you can fix the error this would be nice.

you can post the fixed code here if you want
Did you make any changes to the original source? I assumed the original as is would compile and your first error isn't even rellevant to the original code as far as I can see.
no i dont make any changes i upload a screenshot from vs++

in the internet i found something ppl. say change the character set from unicode to multibyte set (project/properities/confi.proper/general/Character set

i change it to multibyte and i get this error

Code:
1>Source1.cpp
1>.Source1.cpp(53) : warning C4996: 'getch': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _getch. See online help for details.
1>        C:Program FilesMicrosoft Visual Studio 9.0VCincludeconio.h(145) : see declaration of 'getch'
1>.Source1.cpp(64) : warning C4996: 'kbhit': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _kbhit. See online help for details.
1>        C:Program FilesMicrosoft Visual Studio 9.0VCincludeconio.h(147) : see declaration of 'kbhit'
1>.Source1.cpp(66) : warning C4996: 'getch': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _getch. See online help for details.
1>        C:Program FilesMicrosoft Visual Studio 9.0VCincludeconio.h(145) : see declaration of 'getch'
1>Linking...
1>MSVCRT.lib(crtexew.obj) : error LNK2001: unresolved external symbol _WinMain@16
1>C:UserstommyDesktoptest1111trainerReleasetrainer.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://c:UserstommyDesktoptest1111trainertrainerReleaseBuildLog.htm"
1>trainer - 2 error(s), 3 warning(s)
so i think something is wrong :/

the screenshot is taken from use unicode set
trainer.jpgattachment deleted · 55 downloads before removal
hmmmmmm
uhm i test it with Dev-C++ and it works fine..
i test it with visual studio 2005+2008 and i get these erros :/

no idea whats wrong..but works now with Dev-C++
You created the project in MSVS as a Win32 windows application when it should have been a win32 console application.
Posts 18 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?