Skip to main content
February 26, 2018
Answered

AcrobatPlugin #include <anything>, error c1189

  • February 26, 2018
  • 1 reply
  • 785 views

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>

[...]

This topic has been closed for replies.
Correct answer lrosenth

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

1 reply

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
lrosenthCorrect answer
Adobe Employee
February 26, 2018

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