sleepy-discord icon indicating copy to clipboard operation
sleepy-discord copied to clipboard

Cannot open include file: 'sleepy_discod\websocketpp_websocket.h': No such file or directory

Open ghost opened this issue 5 years ago • 46 comments

When I want build project, I have got this error: Cannot open include file: 'sleepy_discod\websocketpp_websocket.h': No such file or directory How Can I repair this?

ghost avatar Aug 05 '18 14:08 ghost

I also got this errors: cannot open source file "standard_config_header.h" cannot open source file "websocketpp/client.hpp" cannot open source file "websocketpp/common/memory.hpp" cannot open source file "websocketpp/common/thread.hpp"cannot open source file "websocketpp/config/asio_client.hpp expected a ';' name followed by '::' must be a class or namespace name

ghost avatar Aug 05 '18 14:08 ghost

Can I see your list of include directories?

yourWaifu avatar Aug 05 '18 17:08 yourWaifu

include directories: $(projectdir)D:\sleepydiscord\yourWaifu-sleepy-discord-8b3b9af\include $(projectdir)D:\sleepydiscord\yourWaifu-sleepy-discord-8b3b9af\deps $(projectdir)D:\sleepydiscord\yourWaifu-sleepy-discord-8b3b9af\deps\include $(projectdir)D:\sleepydiscord\yourWaifu-sleepy-discord-8b3b9af\include\sleepy_discord\IncludeNonexistent

ghost avatar Aug 05 '18 18:08 ghost

I will give you in case Library directories: $(projectdir)$(Configuration) $(projectdir)D:\sleepydiscord\yourWaifu-sleepy-discord-8b3b9af\deps\lib

ghost avatar Aug 05 '18 18:08 ghost

you are using macros incorrectly. $(projectdir) is a shortcut for the directory with your project files. For example, $(SolutionDir) points to the directory to the solution files, C:\Users\steve\Documents\GitHub\sleepy-discord\

$(SolutionDir)include
$(SolutionDir)deps
$(SolutionDir)deps\include
$(SolutionDir)include\sleepy_discord\IncludeNonexistent

This evaluates to

C:\Users\steve\Documents\GitHub\sleepy-discord\include
C:\Users\steve\Documents\GitHub\sleepy-discord\deps
C:\Users\steve\Documents\GitHub\sleepy-discord\deps\include
C:\Users\steve\Documents\GitHub\sleepy-discord\include\sleepy_discord\IncludeNonexistent

yourWaifu avatar Aug 05 '18 18:08 yourWaifu

So I have to delete $(SolutionDir) from paths?

ghost avatar Aug 05 '18 18:08 ghost

No, What I'm saying that is that $(projectdir) and $(SolutionDir) points to a directory on your computer. I recommend that you replace all your directories with values that evaluates to the directory with the header or lib files. Like the examples I've given above. You can remove the $(projectdir) macros if you like, just don't expect it to work on other people's computers.

yourWaifu avatar Aug 05 '18 19:08 yourWaifu

From what I understood in the second sentence, I have to set it this way. (I don't understand second sentence) Include directories: $(SolutionDir)include $(SolutionDir)deps $(SolutionDir)deps\include $(SolutionDir)include\sleepy_discord\IncludeNonexistent Library directories: $(SolutionDir)$(Configuration) $(SolutionDir)deps\lib

ghost avatar Aug 05 '18 20:08 ghost

Those paths should work as long as C:\Users\steve\Documents\GitHub\sleepy-discord is where the solution file that you are using is located at.

yourWaifu avatar Aug 05 '18 22:08 yourWaifu

So I reinstall library and I make these paths: Include directories: D:\sleepydiscord\yourWaifu-sleepy-discord-de8f942\include D:\sleepydiscord\yourWaifu-sleepy-discord-de8f942\deps D:\sleepydiscord\yourWaifu-sleepy-discord-de8f942\deps\include D:\sleepydiscord\yourWaifu-sleepy-discord-de8f942\include\sleepy_discord\IncludeNonexistent Library directories: $(SolutionDir)$(Configuration) D:\sleepydiscord\yourWaifu-sleepy-discord-de8f942\deps\lib

And I got these erros: https://pastebin.com/XN3ur7C6 I think I again fail about macros

ghost avatar Aug 06 '18 10:08 ghost

Can I see the list of library files that you are linking?

yourWaifu avatar Aug 06 '18 18:08 yourWaifu

sleepy_discord.lib libcurl_a.lib libcryptoMT.lib libsslMT.lib crypt32.lib I do something and now I have that error: cannot open input file 'sleepy_discord.lib'

ghost avatar Aug 06 '18 18:08 ghost

try recompiling Sleepy Discord and pay attention to the last few lines in the output window.

yourWaifu avatar Aug 06 '18 19:08 yourWaifu

Ok, so I recompile sleepy discord and I have now these errors: https://pastebin.com/rUExhbcA

ghost avatar Aug 06 '18 20:08 ghost

These can be easily fix with a google search like this ldap_unbind_s. If you are on windows, look for the windows docs, like this one https://msdn.microsoft.com/en-us/windows/desktop/aa367005. on the bottom see where it says Requirements, it'll tell you what you need in order to use those functions. So, yea link these. Wldap32.lib, Normaliz.lib

yourWaifu avatar Aug 06 '18 20:08 yourWaifu

Now I have that: Severity Code Description Project File Line Suppression State Error LNK1107 invalid or corrupt file: cannot read at 0x2672 GLaDOS and: Severity Code Description Project File Line Suppression State Warning C4099 'SleepyDiscord::Channel': type name first seen using 'struct' now seen using 'class'

ghost avatar Aug 06 '18 21:08 ghost

can I get the files that are causing those issues, it just says corrupt file but doesn't tell which one. errors usually give that info.

yourWaifu avatar Aug 06 '18 21:08 yourWaifu

image

ghost avatar Aug 06 '18 21:08 ghost

try to do a clean and a rebuild. If that doesn't work, maybe reinstalling the windows sdk will. I'm not sure why it thinks that file is corrupt since it's part of the windows sdk.

yourWaifu avatar Aug 06 '18 21:08 yourWaifu

rebuild project or library?

ghost avatar Aug 06 '18 21:08 ghost

both

yourWaifu avatar Aug 06 '18 21:08 yourWaifu

aww I rebuilded and cleaned projects, but It's still not working. tomorrow I'll reinstall sdk

ghost avatar Aug 06 '18 22:08 ghost

Again same thing, aww

ghost avatar Aug 07 '18 20:08 ghost

I'm not sure if will fix the error but I found the file online https://github.com/dotnetinstaller/dotnetinstaller/blob/master/ThirdParty/Microsoft/Visual%20Studio%208/VC/PlatformSDK/Lib/Wldap32.Lib

yourWaifu avatar Aug 07 '18 20:08 yourWaifu

it's working, but I have a lot of warnings

ghost avatar Aug 08 '18 10:08 ghost

And, I have one question, how can I get serverID?

ghost avatar Aug 08 '18 11:08 ghost

There are many ways to get a serverID. You can get it from the client while in Developer Mode, or you can get it from the onServer event, or from a message, etc.

yourWaifu avatar Aug 08 '18 16:08 yourWaifu

Enable Discord Developer mode. image

Right click on the server icon in Discord click copy id image

TylerTheFox avatar Aug 09 '18 04:08 TylerTheFox

But I wanna get it from function (like message.ID )

ghost avatar Aug 09 '18 07:08 ghost

message.serverID

yourWaifu avatar Aug 09 '18 07:08 yourWaifu