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

Getting FDK samples to run

Community Beginner ,
Sep 06, 2021 Sep 06, 2021

Copy link to clipboard

Copied

Hi,

 

I am trying to get FrameMaker to run any of the samples included in the FDK. FrameMaker throws the exception that script <hello.dll> can't be initialized and I am running into a brick wall trying to figure out what I am missing.

I've added the nessecary include files and lib's before compiling and added my client to my users maker.ini, but I have the feeling I am missing something. Sadly there is no checklist in any of the guides or documentation for FDK that helped me so far to figure out what I am doing wrong.

 

I am using the latest FDK version and Visual Studio 2019. Any help would be greatly appreciated.

Views

339

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
Mentor ,
Sep 08, 2021 Sep 08, 2021

Copy link to clipboard

Copied

Hi,

 

It is true that the documentation is weak, so I commend you on getting as far as you did. Do you have development experience? I'm wondering if the DLL compiles clean, no errors. If so, it should run. The most common reason that you get the "can't initialize" error is because the entry in maker.ini is wrong. I don't mean to get too simplistic or patronize, but are you sure that the path is exactly right in that file?

 

Also, you say you are using the latest version of the FDK, which I assume you mean FDK2020. A client compiled with this version will probably only work with FrameMaker 2020. Maybe you already have that, just noting.

 

It can be a little complicated to troubleshoot these problems, as you have seen. I just thought I'd get the conversation started with a few simple things. Hope this helps.

 

Russ

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
Community Beginner ,
Sep 08, 2021 Sep 08, 2021

Copy link to clipboard

Copied

Hey Russ,

 

thank you for your reply! I am glad for any help, I don't feel patronized.

 

I have experience developing, but I am new to FDK  (and Visual Studio). I am used to Eclipse or IntelliJ.

 

I am using FDK2020, FM2020 and VS 2019.

The Log from building FDK2020\samples\hello\hello.c is the following (I use Visual Studio in german, but I hope you can figure out what you see):

 

Neuerstellen gestartet...
1>------ Neues Erstellen gestartet: Projekt: hello, Konfiguration: Debug x64 ------
1>hello.c
1>   Bibliothek ".\debug/hello.lib" und Objekt ".\debug/hello.exp" werden erstellt.
1>hello.vcxproj -> C:\Program Files\Adobe\FDK2020\samples\hello\x64\Debug\hello.dll
========== Alles neu erstellen: 1 erfolgreich, 0 fehlerhaft, 0 übersprungen ==========

 

 For my users maker.ini in %AppData%\Roaming\Adobe\FrameMaker\16\ I added the following after copying the compiled hello.dll file into the Adobe FrameMaker2020\fminit folder

 

[APIClients]
hello=Standard, hello, fminit\hello.dll, all

 

After starting FrameMaker I get greeted by this

 

grafik.png

 

When I use an absolute path in my users maker.ini instead of the relative path I see the same result.

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
Mentor ,
Sep 08, 2021 Sep 08, 2021

Copy link to clipboard

Copied

Hi. So, I tried to replicate this myself and it works fine for me. I copied the FDK directory to a temporary location, then built "hello" with VS2019. When I initially opened the project, I accepted the offer to upgrade the project to the latest version. So after the build, I copied the hello.dll file to 'fminit' and tried all of the three maker.ini entries, all of which work:

 

Hello=Standard, Hello, C:\temp\delete\FDK2020\samples\hello\debug\hello.dll, all
Hello=Standard, Hello, C:\Program Files\Adobe\Adobe FrameMaker 2020\fminit\hello.dll, all
Hello=Standard, Hello, fminit\hello.dll, all

 

I see this when I start FM2020:

fdk.png

 

Everything you say that you did seems correct. Dumb question, are you positive that hello.dll exists under fminit? I mean, you said you copied it there, I believe you.

 

If this does not get you anywhere, maybe you could email me your DLL file. russ at weststreetconsulting dot com. I can try to run it here. The result might give us some clue. And I could send you the file I built.

 

Russ

 

 

 

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
Community Beginner ,
Sep 09, 2021 Sep 09, 2021

Copy link to clipboard

Copied

LATEST

With the help of Russ I have figured out what I did wrong. So because I don't want to be that guy and for future google results I want to post what I did wrong.

 

I didn't compile the whole project folder, but rather only the "hello" subfolder, which lead to my problem. When compiling the whole project folder it works no problem. I did a little visual help to make clear what I mean.

 

vscompile.png

 

Thanks everyone for your help.

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