From 7cd67693ccfa628020a2516114654b2453aa908b Mon Sep 17 00:00:00 2001 From: vaporvee Date: Sat, 22 Mar 2025 01:33:28 +0100 Subject: [PATCH] FINALLY fixed the build error --- SConstruct | 11 +++++++---- src/discordgodot.cpp | 1 + src/editor_presence.cpp | 1 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index e1fb4e5..b49bd44 100644 --- a/SConstruct +++ b/SConstruct @@ -3,7 +3,7 @@ import os env = SConscript("src/lib/godot-cpp/SConstruct") -env.Append(CPPPATH=["src/"]) +env.Append(CPPPATH=["src/", "src/lib/discord_social_sdk/include/"]) sources = Glob("src/*.cpp") if env["platform"] == "macos": @@ -18,8 +18,10 @@ elif env["platform"] == "windows": discord_library = "discord_partner_sdk.dll" libexportfolder = "/windows/" - folder = "release/" - discord_library_target = discord_library +if env["target"] == "template_debug": + debugsuffix = "_debug" +else: + debugsuffix = "" env.Append(LIBPATH=["src/lib/discord_social_sdk/lib/release/"]) env.Append(LIBS=["discord_partner_sdk"]) @@ -29,7 +31,8 @@ env.Append(CPPDEFINES=["HOT_RELOAD_ENABLED"]) library = env.SharedLibrary( target="project/addons/discord-rpc-gd/bin/" + libexportfolder - + discord_library, + + "discord_partner_sdk_binding" + + debugsuffix, source=sources, ) env.Depends( diff --git a/src/discordgodot.cpp b/src/discordgodot.cpp index d416ac8..aed9f2d 100644 --- a/src/discordgodot.cpp +++ b/src/discordgodot.cpp @@ -1,3 +1,4 @@ +#define DISCORDPP_IMPLEMENTATION #include "discordpp.h" #include "discordgodot.h" #include diff --git a/src/editor_presence.cpp b/src/editor_presence.cpp index 562cdb2..077d65f 100644 --- a/src/editor_presence.cpp +++ b/src/editor_presence.cpp @@ -1,5 +1,4 @@ #include "editor_presence.h" -#include "discordpp.h" #include #include #include