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

Visual Studio Undefined Objects Acrobat DC

Community Beginner ,
Jun 30, 2017 Jun 30, 2017

Hi,

I am trying to use the Embed3dData plugin on Adobe Acrobat DC.

However, most of the objects are simply undefined...

I tried downgrading my Visual Studio 2015 to 2013, and still, no change...

Thank you!!!

TOPICS
Acrobat SDK and JavaScript
3.7K
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
Community Expert ,
Jun 30, 2017 Jun 30, 2017

Looks like that the compiler can't find the header files.

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
Community Beginner ,
Jun 30, 2017 Jun 30, 2017

They are included in the solution.

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
Community Expert ,
Jun 30, 2017 Jun 30, 2017

What error messages do you get?

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
Community Beginner ,
Jun 30, 2017 Jun 30, 2017

Too many errors becase nothing is defined...

Many h files are located in the External Dependencies.

Maybe it is connected to the file "AcroDspOptions"?

this is its content:

"

/D ACRO_SDK_LEVEL=0x000A0000

/D PI_ACROCOLOR_VERSION=0x00060000

/D PDMETADATA_HFT=1

/D PLUGIN=1

/D ACRO_SDK_PLUGIN_SAMPLE=1

/I "."

/I "..\sources"

/I "..\..\..\Headers\API"

/I "..\..\..\Headers\SDK"

/I "..\..\..\..\XMP_SDK\MetadataToolkit\Headers"

/D _CRT_SECURE_NO_DEPRECATE

"

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
Community Expert ,
Jul 01, 2017 Jul 01, 2017

Look at error #1.

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
Community Beginner ,
Jul 01, 2017 Jul 01, 2017

Thank you,

How do I fix it?

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
Community Expert ,
Jul 01, 2017 Jul 01, 2017

I don't know what you have done.

When I open the solution file I can build the plugin without any error.

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
LEGEND ,
Jul 01, 2017 Jul 01, 2017

Getting the first plug-in to compile is always a challenge, especially if you are new to C. I think you have moved some files or folders from their original location. Whatever the cause you need to fix it. The problem is very clear.

1. The compiler cannot find PIHeaders.h

2. This is used in your source code with #include

3. Directories are searched for headers.

4. You can see the directories searched in your post

/I "."

/I "..\sources"

/I "..\..\..\Headers\API"

/I "..\..\..\Headers\SDK"

/I "..\..\..\..\XMP_SDK\MetadataToolkit\Headers"

5. Consider what these folders actually mean relative to the project folder.

6. Examine them IN DETAIL don't assume it will magically wok

If you have moved or removed anything the references to relative folders are no longer valid. Change them to absolute folders (full path names).

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
Community Beginner ,
Jul 01, 2017 Jul 01, 2017

This is my solution folder path:

C:\Users\ofirs\Desktop\NEW DC SDK\Adobe\Acrobat DC SDK\Version 1\PluginSupport\Samples\Embed3dData\win32

This is the Headers' folder path:

C:\Users\ofirs\Desktop\NEW DC SDK\Adobe\Acrobat DC SDK\Version 1\PluginSupport\Headers

Is there a specific place where the whole SDK directory has to be in?

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
Community Expert ,
Jul 01, 2017 Jul 01, 2017

No. You can extract the zip file where you want.

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
LEGEND ,
Jul 01, 2017 Jul 01, 2017

You can put the SDK and code where you want. But you have to give the compiler accurate information about where to find the headers. That's your job.

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
Community Beginner ,
Jul 01, 2017 Jul 01, 2017

Thanks! And how do I tell the compiler where to find the headers?

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
Community Expert ,
Jul 01, 2017 Jul 01, 2017

in the file "AcroDspOptions".

Did you get any error message when you compile Embed3dData.cpp ?

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
LEGEND ,
Jul 01, 2017 Jul 01, 2017

I don't use that version of Visual Studio, but you quoted the information. Hopefully you can change it too. This is fundamental, every C application needs header file directories set.

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
Community Beginner ,
Jul 01, 2017 Jul 01, 2017

Bernd, yes, I get a compile error.

I can edit the AcroDspOptions text file:

/D ACRO_SDK_LEVEL=0x000A0000

/D PI_ACROCOLOR_VERSION=0x00060000

/D PDMETADATA_HFT=1

/D PLUGIN=1

/D ACRO_SDK_PLUGIN_SAMPLE=1

/I "."  --line 1

/I "..\sources" --line 2

/I "..\..\..\Headers\API" --line 3

/I "..\..\..\Headers\SDK"--line 4

/I "..\..\..\..\XMP_SDK\MetadataToolkit\Headers" --line 5

Does the file tell the compiler where the files are? If the answer is yes, how does the compiler know how to find this text file, but not the header files??

I dont understand what am I supposed to edit. What is the purpose of the first part which start with /D?

In the second part, whose lines I've numbered, do I need to replace the pathes?

What is the meaning of the /D and the /I?

And which folders are lines 1,2,5 referring?

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
Community Expert ,
Jul 01, 2017 Jul 01, 2017

You should first learn the basics of Visual Studio and Compilers.

/D are for declarations and /I for include folders.

Compiler Options Listed Alphabetically

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
Community Beginner ,
Jul 01, 2017 Jul 01, 2017

Thank you for the link.

Your answer is very general. I know that I have to learn things in order to use the SDK.

However, learning the basics of Visual Studio and Compilers is not the most effective way to use the SDK. It's supposed to work more easilly... I need more focused and specific directions to solve my broken links problem.

I control Visual Studio with C#. Cpp is something new to me.

Thank you

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
Community Expert ,
Jul 01, 2017 Jul 01, 2017

When you extract the files from the SDK and use the correct version of Visual Studio you can build the solution.

The samples were tested with VS 2010 SP 1.

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
LEGEND ,
Jul 01, 2017 Jul 01, 2017

Who exactly said that the SDK is supposed to be easy or that you could just ignore the basics? when I started with plugins I was an experienced C programmer with detailed knowledge of PDF internals. I took a did month of work to learn the basics of plugins before I could make anything useful. Programming is not always easy, and to be a programmer is to be willing to study.

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
Community Expert ,
Jul 01, 2017 Jul 01, 2017
LATEST

Just to add to what TSN said: You need to be able to use Visual Studio in your sleep before you want to start to deal with the Acrobat SDK. Otherwise you will always struggle to figure out if a problem is caused by your build environment, or by the SDK. I've taught using the Acrobat plug-in API to engineers, and the one month that TSN was talking about is the absolute minimum you need to spend to get familiar enough with the SDK to have a sense of what's going on. Chances are that it will take you three months of working with it on a daily basis before you can call yourself fluent in it. And even then, you will still be puzzled by what's going on in your plug-in (or more often than not with what's not going on). If you cannot commit the time to first become fluent in C/C++ and Visual Studio, then it might be cheaper to hire somebody to do that work for you.

Also, unless you know exactly what you are doing, you have to use the one version of Visual Studio (or Xcode on the Mac) that is listed in the API documentation.

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