Visual Studio Undefined Objects Acrobat DC

Jun 30, 2017

Copy link to clipboard

Copied

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

Views

739

Likes

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

Visual Studio Undefined Objects Acrobat DC

Jun 30, 2017

Copy link to clipboard

Copied

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

Views

740

Likes

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
Jun 30, 2017 0
Adobe Community Professional ,
Jun 30, 2017

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jun 30, 2017 0
Jun 30, 2017

Copy link to clipboard

Copied

They are included in the solution.

Likes

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
Reply
Loading...
Jun 30, 2017 0
Adobe Community Professional ,
Jun 30, 2017

Copy link to clipboard

Copied

What error messages do you get?

Likes

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
Reply
Loading...
Jun 30, 2017 0
Jun 30, 2017

Copy link to clipboard

Copied

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

"

Likes

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
Reply
Loading...
Jun 30, 2017 0
Adobe Community Professional ,
Jul 01, 2017

Copy link to clipboard

Copied

Look at error #1.

Likes

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
Reply
Loading...
Jul 01, 2017 0
Jul 01, 2017

Copy link to clipboard

Copied

Thank you,

How do I fix it?

Likes

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
Reply
Loading...
Jul 01, 2017 0
Adobe Community Professional ,
Jul 01, 2017

Copy link to clipboard

Copied

I don't know what you have done.

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

Likes

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
Reply
Loading...
Jul 01, 2017 0
Most Valuable Participant ,
Jul 01, 2017

Copy link to clipboard

Copied

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).

Likes

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
Reply
Loading...
Jul 01, 2017 1
Jul 01, 2017

Copy link to clipboard

Copied

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?

Likes

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
Reply
Loading...
Jul 01, 2017 0
Adobe Community Professional ,
Jul 01, 2017

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jul 01, 2017 0
Most Valuable Participant ,
Jul 01, 2017

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Jul 01, 2017 0
Jul 01, 2017

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jul 01, 2017 0
Adobe Community Professional ,
Jul 01, 2017

Copy link to clipboard

Copied

in the file "AcroDspOptions".

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

Likes

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
Reply
Loading...
Jul 01, 2017 0
Most Valuable Participant ,
Jul 01, 2017

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Jul 01, 2017 1
Jul 01, 2017

Copy link to clipboard

Copied

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?

Likes

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
Reply
Loading...
Jul 01, 2017 0
Adobe Community Professional ,
Jul 01, 2017

Copy link to clipboard

Copied

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

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

Compiler Options Listed Alphabetically

Likes

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
Reply
Loading...
Jul 01, 2017 0
Jul 01, 2017

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Jul 01, 2017 0
Adobe Community Professional ,
Jul 01, 2017

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Jul 01, 2017 1
Most Valuable Participant ,
Jul 01, 2017

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Jul 01, 2017 0
Adobe Community Professional ,
Jul 01, 2017

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
Jul 01, 2017 0