Browse Source

macOS: work around linking issues when building the app executable.

Sasha Szpakowski 2 years ago
parent
commit
fc5b53a456
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/love.cpp

+ 5 - 0
src/love.cpp

@@ -65,6 +65,11 @@ LOVE_EXPORT DWORD AmdPowerXpressRequestHighPerformance = 1;
 
 #include <vector>
 
+// Explicitly instantiate std::vector<std::string> to work around linker issues
+// with libc++ when symbols are hidden-by-default.
+// https://stackoverflow.com/a/48273604
+template class std::vector<std::string>;
+
 static void get_app_arguments(int argc, char **argv, int &new_argc, char **&new_argv)
 {
 	std::vector<std::string> temp_argv;