Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

AcrobatPlugin #include <anything>, error c1189

Guest
Feb 26, 2018 Feb 26, 2018

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>

[...]

TOPICS
Acrobat SDK and JavaScript
761
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Feb 26, 2018 Feb 26, 2018

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

Translate
Adobe Employee ,
Feb 26, 2018 Feb 26, 2018

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 26, 2018 Feb 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 26, 2018 Feb 26, 2018
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines