Josko / aura-bot

Warcraft III high-performance hosting bot written in C++14.
72 stars 41 forks source link

Errors while compiling VS2017 #56

Closed janaron closed 6 years ago

janaron commented 6 years ago

Okay so i downloaded the VS2017, the bot, opened aura.sln, retargeted solution, chose x64, clicked build.

These are the errors I got. Any idea how to fix?

Severity Code Description Project File Line Suppression State Error C1083 Cannot open include file: 'string': No such file or directory (compiling source file bnetprotocol.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\bnetprotocol.h 30
Error C1083 Cannot open include file: 'cstdint': No such file or directory (compiling source file config.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\aura.h 24
Error C1083 Cannot open include file: 'cstdint': No such file or directory (compiling source file bncsutilinterface.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\bncsutilinterface.h 24
Error C1083 Cannot open include file: 'iostream': No such file or directory (compiling source file bnet.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\includes.h 26
Error C1083 Cannot open include file: 'cstdlib': No such file or directory (compiling source file crc32.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\crc32.h 4
Error C1083 Cannot open include file: 'cstdlib': No such file or directory aura C:\Users\jan_a\Downloads\aura-bot-master\src\csvparser.cpp 33
Error C1083 Cannot open include file: 'iostream': No such file or directory (compiling source file fileutil.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\includes.h 26
Error C1083 Cannot open include file: 'string': No such file or directory (compiling source file game.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\gameslot.h 24
Error C1083 Cannot open include file: 'utility': No such file or directory aura C:\Users\jan_a\Downloads\aura-bot-master\src\gameplayer.cpp 21
Error C1083 Cannot open include file: 'utility': No such file or directory aura C:\Users\jan_a\Downloads\aura-bot-master\src\gameprotocol.cpp 21
Error C1083 Cannot open include file: 'cstdint': No such file or directory (compiling source file gpsprotocol.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\aura.h 24
Error C1083 Cannot open include file: 'cstdint': No such file or directory (compiling source file gameslot.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\aura.h 24
Error C1083 Cannot open include file: 'cstdint': No such file or directory (compiling source file aura.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\aura.h 24
Error C1083 Cannot open include file: 'stdarg.h': No such file or directory (compiling source file auradb.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\sqlite3.h 35
Error C1083 Cannot open include file: 'vector': No such file or directory (compiling source file irc.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\irc.h 24
Error C1083 Cannot open include file: 'vector': No such file or directory (compiling source file map.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\map.h 90
Error C1083 Cannot open include file: 'cstring': No such file or directory aura C:\Users\jan_a\Downloads\aura-bot-master\src\socket.cpp 20
Error C1083 Cannot open include file: 'vcruntime.h': No such file or directory (compiling source file sha1.cpp) aura C:\Program Files (x86)\Windows Kits\10\Include\10.0.16299.0\ucrt\corecrt.h 10
Error C1083 Cannot open include file: 'iostream': No such file or directory (compiling source file stats.cpp) aura c:\users\jan_a\downloads\aura-bot-master\src\includes.h 26

Josko commented 6 years ago

Ok this seems strange. What your VS2017 is saying is, that it is missing some STL headers and whatnot. Could you perhaps compile some other simple C++ project or try to reconfigure your Visual Studio? These files are not shipped by aura-bot and if they're missing, I am afraid you won't be able to compile virtually any C++ program.

Edit: Also just tested it with my Windows 10 with VS2017 machine and it worked...

janaron commented 6 years ago

I doubt there could be any problems with the VS2017 except if it is missing some external dependencies as i downloaded it yesterday. My computer is also quite recently formatted (latest Win10 with all updates) and all the VS redistrubutables are installed. I downloaded a random c++ file just to test and i had no trouble compiling it.

It seems like the BNCSutil and StormLib compiled without problems, only Aura that is causing errors. I hope we can fix this problem. But in the meantime, could you compile it for me so i could download and use the finished version? :)

Trying to reconfigure/modify VS2017 atm, noticed there were some optional things i could check so did that. Will report back if it fixes the issue.

EDIT: The reconfiguration didn't help unfortunately :/

Josko commented 6 years ago

Yeah but still that's strange because both BNCSUtil and StromLib are pure C projects so it would be kinda expected that they don't get these files as "missing". If you got any more info I'd be happy to fix it though.

The Windows CI tries to compile it on every commit and you can find the release binary here: https://ci.appveyor.com/project/Josko/aura-bot/build/artifacts

janaron commented 6 years ago

Any idea what info/how i could provide what you/me need to fix it?

Josko commented 6 years ago

Could you try doing what some user describes in this this post:

https://stackoverflow.com/questions/31736361/visual-studio-2015-gives-me-errors-upon-creating-a-simple-test-console-program/43019759#43019759

And then try to recompile. Basically this re-sets the SDK version and my guess is that I just have an old one so that's why it works for me.

janaron commented 6 years ago

I installed the SDK version it asked for but that didn't help. I tried looking at the answers in that post but nothing seemed relevant, looks like it has changed a lot in 2017 vs 2015. But anyhow i got the bot up and running with the artifact so I'm happy :D

Josko commented 6 years ago

Hey, I just had the same problem on a fresh Win 10 with newest VS2017.

Commit 9eae8e5ac09dcba875f59b1392c7e5e069109705 should alleviate the issue!