xarkes / L2Bot

A basic implementation of a Lineage II bot
25 stars 19 forks source link

Error code C1010? #9

Open Amidazs opened 1 year ago

Amidazs commented 1 year ago

Hi there,

I know it's been a while since you've posted this code, I came across it whilst looking for a fairly simple bot for Lineage. I have however 0 knowledge of Visual studio or any of the code. I have managed to get to the point where I compile the dll, but it gets the following error: Severity Code Description Project File Line Suppression State Error C1010 unexpected end of file while looking for precompiled header. Did you forget to add '#include "pch.h"' to your source? L2BotLib C:\Users\Amidaz\Downloads\l2bot-master\L2BotLib\dllmain.cpp 341

How do I fix this?

Thanks in advance!

xarkes commented 1 year ago

Hey, I think this issue appears with newer versions of VS. Many people come across this issue and one way to fix it is to disable the precompiled C++ headers in the project settings.

I think it happens because this version of the project doesn't have the required headers files.

Hope it helps!

References:

Amidazs commented 1 year ago

Ah thanks so much! That did resolve the issue, though there is another one now. I hope you can help me on my way with this as well!

There is a lot of these errors: Error C2872 'byte': ambiguous symbol (compiling source file EventSink.cpp) Error C4596 'GetGroundItems': illegal qualified name in member declaration (compiling source file GameLogic.cpp)
Error C2039 'Background': is not a member of 'QPalette' L2Bot C:\Users\Remko\Downloads\l2bot-master\L2Bot\MapWidget.cpp
Error C2664 'LPWSTR CopyExecutableSomewhere(WCHAR ,WCHAR )': cannot convert argument 2 from 'const wchar_t [5]' to 'WCHAR *'

These error codes appear multiple times. I'm sorry to bother you about this so much. Any help is greatly appreciated!

xarkes commented 1 year ago

Hey,

I suspect it is because you are compiling with the wrong std version. I don't remember what was the default I used, maybe try using /std:c++14 in the compilation options?