Skip to main content
February 26, 2018
解決済み

AcrobatPlugin #include <anything>, error c1189

  • February 26, 2018
  • 返信数 1.
  • 791 ビュー

I can compile the BasicPlugin just fine.

Now I'd like to add libraries, namely <vector>. But doing so will result in the error `fatal error C1189: #error :  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro.'.

Commenting out line 707 in CorCalls.h seems to fix the problem, but I have no idea what this will break in turn.

Is it not possible to include anything in Acrobat plugins or is there a way to fix this?

[...]

// Acrobat Headers.

#ifndef MAC_PLATFORM

#include "PIHeaders.h"

#endif

#include <vector>

[...]

このトピックへの返信は締め切られました。
解決に役立った回答 lrosenth

Always put standard libraries first – general C++ “goodness” (not specific to Acrobat plugins)

返信数 1

lrosenth
Adobe Employee
Adobe Employee
February 26, 2018

Where are you adding this? Adobe uses standard C++ libraries all the time in our plugins.

February 26, 2018

In the BasicPlugin.cpp file from the BasicPlugin solution in the SDK samples.

I added it after the `PIHeaders.h' as shown above. I now moved it just before the `PIHeaders.h' and now it compiles without errors.

I guess that's the way to include libraries then.

Thank you kindly for your time.

lrosenth
Adobe Employee
lrosenth解決!
Adobe Employee
February 26, 2018

Always put standard libraries first – general C++ “goodness” (not specific to Acrobat plugins)