Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code error? #249

Open
MiniAppleTheApple opened this issue Nov 16, 2021 · 3 comments
Open

Code error? #249

MiniAppleTheApple opened this issue Nov 16, 2021 · 3 comments

Comments

@MiniAppleTheApple
Copy link

the code

#include "sleepy_discord/sleepy_discord.h"

class MyClientClass : public SleepyDiscord::DiscordClient {
public:
	using SleepyDiscord::DiscordClient::DiscordClient;
	void onMessage(SleepyDiscord::Message message) override {
		if (message.startsWith("whcg hello"))
			sendMessage(message.channelID, "Hello " + message.author.username);
	}
};

int main() {
	myClientClass client("token", SleepyDiscord::USER_CONTROLED_THREADS);
	client.run();
}

the error

n file included from /Users/thiagochenzhu/Documents/project/cpp-discord/sleepy-discord/deps/cpr/cpr/session.cpp:1:
In file included from /Users/thiagochenzhu/Documents/project/cpp-discord/sleepy-discord/deps/cpr/include/cpr/session.h:22:
/Users/thiagochenzhu/Documents/project/cpp-discord/sleepy-discord/deps/cpr/include/cpr/response.h:30:33: error: 
      use of undeclared identifier 'CURLINFO_SIZE_DOWNLOAD_T'; did you mean 'CURLINFO_SIZE_DOWNLOAD'?
        curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &downloaded_bytes);
                                ^~~~~~~~~~~~~~~~~~~~~~~~
                                CURLINFO_SIZE_DOWNLOAD
/usr/include/curl/curl.h:2546:69: note: expanded from macro 'curl_easy_getinfo'
#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
                                                                    ^
/usr/include/curl/curl.h:2267:3: note: 'CURLINFO_SIZE_DOWNLOAD' declared here
  CURLINFO_SIZE_DOWNLOAD    = CURLINFO_DOUBLE + 8,
  ^
In file included from /Users/thiagochenzhu/Documents/project/cpp-discord/sleepy-discord/deps/cpr/cpr/session.cpp:1:
In file included from /Users/thiagochenzhu/Documents/project/cpp-discord/sleepy-discord/deps/cpr/include/cpr/session.h:22:
/Users/thiagochenzhu/Documents/project/cpp-discord/sleepy-discord/deps/cpr/include/cpr/response.h:31:33: error: 
      use of undeclared identifier 'CURLINFO_SIZE_UPLOAD_T'; did you mean 'CURLINFO_SIZE_UPLOAD'?
        curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &uploaded_bytes);
                                ^~~~~~~~~~~~~~~~~~~~~~
                                CURLINFO_SIZE_UPLOAD
/usr/include/curl/curl.h:2546:69: note: expanded from macro 'curl_easy_getinfo'
#define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
                                                                    ^
/usr/include/curl/curl.h:2266:3: note: 'CURLINFO_SIZE_UPLOAD' declared here
  CURLINFO_SIZE_UPLOAD      = CURLINFO_DOUBLE + 7,
  ^
2 errors generated.
make[2]: *** [sleepy-discord/deps/cpr/cpr/CMakeFiles/cpr.dir/session.cpp.o] Error 1
make[1]: *** [sleepy-discord/deps/cpr/cpr/CMakeFiles/cpr.dir/all] Error 2
make: *** [all] Error 2
@eggveloper
Copy link

this looks like an error from a dependency called "cpr" which is not related to sleepy-discord
maybe go find their github and put the issue there

@MiniAppleTheApple
Copy link
Author

thank

@eggveloper
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants