Results 1 to 8 of 8
  1. #1
    FantaBrause's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0

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

    Hello i try to compile these trainer
    https://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?

  2. #2
    Toymaker's Avatar
    Join Date
    Feb 2008
    Gender
    male
    Location
    Hannah, Montana
    Posts
    659
    Reputation
    14
    Thanks
    193
    My Mood
    Amused
    If you post your source i'll fix it for you or is the code at that link what you're using?

  3. #3
    FantaBrause's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    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

  4. #4
    Toymaker's Avatar
    Join Date
    Feb 2008
    Gender
    male
    Location
    Hannah, Montana
    Posts
    659
    Reputation
    14
    Thanks
    193
    My Mood
    Amused
    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.

  5. #5
    FantaBrause's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    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

  6. #6
    Toymaker's Avatar
    Join Date
    Feb 2008
    Gender
    male
    Location
    Hannah, Montana
    Posts
    659
    Reputation
    14
    Thanks
    193
    My Mood
    Amused
    Dude... I successfully compiled the code in both Dev-C++ and MVSC++ I don't understand why it's not working for you unless you changed it or use a fail compiler. The original at https://www.mpgh.net/forum/17-tutoria...c_trainer.html works fine, end of story sir.

  7. #7
    FantaBrause's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    0
    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++

  8. #8
    Celestialkey's Avatar
    Join Date
    May 2009
    Posts
    3
    Reputation
    10
    Thanks
    0
    You created the project in MSVS as a Win32 windows application when it should have been a win32 console application.

Similar Threads

  1. Writing your own C++ Trainer
    By l0ngcat in forum Game Hacking Tutorials
    Replies: 46
    Last Post: 03-06-2019, 10:29 PM
  2. Writing your own Visual Basics (v5 or v6) Trainer
    By TheRedEye in forum Game Hacking Tutorials
    Replies: 29
    Last Post: 12-09-2013, 09:56 AM
  3. Create Your own ADVANCED Trainer
    By Twirlyman15 in forum Combat Arms Discussions
    Replies: 15
    Last Post: 02-27-2010, 06:58 AM
  4. Make your own trainer with CE 5.4
    By Twirlyman15 in forum Combat Arms Hacks & Cheats
    Replies: 3
    Last Post: 08-18-2008, 09:10 PM
  5. How to make your own radiostation?
    By nasir91 in forum General
    Replies: 3
    Last Post: 04-30-2007, 07:25 AM

Tags for this Thread