We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 449d351 commit 6f59709Copy full SHA for 6f59709
1 file changed
cli/main.cpp
@@ -76,6 +76,12 @@
76
static char exename[1024] = {0};
77
#endif
78
79
+#if defined(__APPLE__)
80
+#include <mach-o/dyld.h>
81
+
82
+static char exename[1024] = {0};
83
+#endif
84
85
/**
86
* Main function of cppcheck
87
*
@@ -95,6 +101,11 @@ int main(int argc, char* argv[])
95
101
GetModuleFileNameA(nullptr, exename, sizeof(exename)/sizeof(exename[0])-1);
96
102
argv[0] = exename;
97
103
104
105
+ uint32_t size = sizeof(exename);
106
+ _NSGetExecutablePath(exename, &size);
107
+ argv[0] = exename;
108
98
109
// *INDENT-OFF*
99
110
#ifdef NDEBUG
100
111
try {
0 commit comments