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

AcrobatPlugin #include <anything>, error c1189

Guest
Feb 26, 2018 Feb 26, 2018

Copy link to clipboard

Copied

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

Views

461

Translate

Translate

Report

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)

Votes

Translate

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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