diff --git a/client/TracyCallstack.cpp b/client/TracyCallstack.cpp index 241cefbb..81cd5f56 100644 --- a/client/TracyCallstack.cpp +++ b/client/TracyCallstack.cpp @@ -133,7 +133,7 @@ void InitCallstack() #endif } -TRACY_API tracy_force_inline uintptr_t* CallTrace( int depth ) +TRACY_API uintptr_t* CallTrace( int depth ) { auto trace = (uintptr_t*)tracy_malloc( ( 1 + depth ) * sizeof( uintptr_t ) ); const auto num = RtlWalkFrameChain( (void**)( trace + 1 ), depth, 0 ); diff --git a/common/TracyApi.h b/common/TracyApi.h index 850ca5c0..a51ee33b 100644 --- a/common/TracyApi.h +++ b/common/TracyApi.h @@ -2,10 +2,12 @@ #define __TRACYAPI_H__ #if defined _WIN32 || defined __CYGWIN__ -# if defined TRACY_IMPORTS +# if defined TRACY_EXPORTS +# define TRACY_API __declspec(dllexport) +# elif defined TRACY_IMPORTS # define TRACY_API __declspec(dllimport) # else -# define TRACY_API __declspec(dllexport) +# define TRACY_API # endif #else # define TRACY_API __attribute__((visibility("default"))) diff --git a/library/win32/TracyProfiler.vcxproj b/library/win32/TracyProfiler.vcxproj index b1e476c3..ef035e22 100644 --- a/library/win32/TracyProfiler.vcxproj +++ b/library/win32/TracyProfiler.vcxproj @@ -124,7 +124,7 @@ Use Level3 true - WIN32;_DEBUG;TRACYPROFILER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + WIN32;_DEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true pch.h @@ -139,7 +139,7 @@ Use Level3 true - _DEBUG;TRACYPROFILER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + _DEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true pch.h @@ -156,7 +156,7 @@ true true true - WIN32;NDEBUG;TRACYPROFILER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + WIN32;NDEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true pch.h @@ -175,7 +175,7 @@ true true true - WIN32;NDEBUG;TRACYPROFILER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + WIN32;NDEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true pch.h @@ -194,7 +194,7 @@ true true true - TRACY_ENABLE;NDEBUG;TRACYPROFILER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + TRACY_ENABLE;NDEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true @@ -212,7 +212,7 @@ true true true - TRACY_ON_DEMAND;TRACY_ENABLE;NDEBUG;TRACYPROFILER_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + TRACY_ON_DEMAND;TRACY_ENABLE;NDEBUG;TRACY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true diff --git a/manual/tracy.tex b/manual/tracy.tex index faed494c..61d3d608 100644 --- a/manual/tracy.tex +++ b/manual/tracy.tex @@ -382,7 +382,7 @@ In projects that consist of multiple DLLs/shared objects things are a bit differ For that you need a \emph{profiler DLL} to which your executable and the other DLLs link. If that doesn't exist you have to create one explicitly for Tracy\footnote{You may also look at the \texttt{library} directory in the profiler source tree.}. This library should contain the \texttt{tracy/TracyClient.cpp} source file. Link the executable and all DLLs which you want to profile to this DLL. -If you are targeting Windows with Microsoft Visual Studio, add the \texttt{TRACY\_IMPORTS} define to your application. While this is an optional step, it enables more efficient code. +If you are targeting Windows with Microsoft Visual Studio or MinGW, add the \texttt{TRACY\_IMPORTS} define to your application. \subsubsection{Problematic platforms} diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 404aac2a..ef1dfa4f 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -11,6 +11,10 @@ #include #include #include + +#ifdef __MINGW32__ +# define __STDC_FORMAT_MACROS +#endif #include #include