Building NVTX as a dynamic library

I’m trying to build NVTX (v3) as a dynamic library as described here

However I don’t see any exported symbols?

I have a file nvtx.c:

#define NVTX_EXPORT_API
#include <nvtx3/nvToolsExt.h>

and build it with

gcc -fPIC -shared -Ic/include -ldl nvtx.c -o nvtx.so

but it only gives me the following symbols:

├ nm -D nvtx.so
0000000000205510 B __bss_start
                 w __cxa_finalize
                 U dlclose
                 U dlopen
                 U dlsym
0000000000205510 D _edata
0000000000205520 B _end
0000000000003248 T _fini
                 U getenv
                 w __gmon_start__
0000000000001298 T _init
                 w _ITM_deregisterTMCloneTable
                 w _ITM_registerTMCloneTable
                 U sched_yield

It appears to be caused by pragmas in the headers. I’ve added a PR here: remove hidden pragmas by simonbyrne · Pull Request #64 · NVIDIA/NVTX · GitHub

@jcohen is there anything else we need to handle here?