I strongly recommend you take a look at the GenerateExportHeader module. It automates this sort of logic and it supports a wide range of toolchains.
I strongly recommend you take a look at the GenerateExportHeader module. It automates this sort of logic and it supports a wide range of toolchains.