Results 1 to 6 of 6

Thread: Compiling and using Neo Hookean plugin

  1. #1
    Join Date
    Jul 2019
    Posts
    2

    Default Compiling and using Neo Hookean plugin

    Hello,

    I have a question with regards to compiling the existing Neo Hookean plug in template. I compiled the Neo Hookean template plugin using MS Visual Studio 2015. I specified the Include Directories, Library Directories as well as the Additional Dependencies. The code compiles and the .dll file is generated. However, when I try to use that generated .dll file in FEBio, it gives me this message

    Failed loading plugin neo.dll (neo is the name of the dll file)
    Reason: Required plugin function GetSDKVersion not found

    Do, I have to make any changes to the Neo Hookean template when compiling in my own computer, or am I doing something wrong when compiling it? I am using FEBio 2.9 SDK and FEBio 2.9.1, the main program. Any assistance would be helpful.

    Thanks,
    Anup

  2. #2

    Default

    Anup,

    It seems like you may have only compiled two of the source files in your library, namely FENeoHookeanPI.h, and FENeoHookeanPI.cpp. You also need to compile dllmain.cpp. That source file contains several required functions for the plugin to be properly registered with FEBio when it's imported.

    Hopefully that helps. Let me know if you have any more questions.

    Michael Herron

  3. #3
    Join Date
    Jul 2019
    Posts
    2

    Default

    Michael,

    Thank you for your reply. I have all the 3 files dllmain.cpp, FENeoHookeanPI.h, and FENeoHookeanPI.cpp as the Source Files in my project. I have then used Build Solution in Visual Studio to generate the .dll file. Is this the correct way of compiling? If so, I still get the same error message.

    Thanks,
    Anup

  4. #4
    Join Date
    Mar 2019
    Posts
    9

    Default

    Hi all,

    I have the same problem. I have tried to compile the code in Visual Studio 2015 in order to generate the .dll file. However, when I want to use the generated .dll file I get the same error (Reason: Required plugin function GetSDKVersion not found.). I have tried to use some of the available plugins on the FEBio website and they work fine. I want to compile one of the existing plugin samples.

    Best,

  5. #5
    Join Date
    Nov 2007
    Location
    Salt Lake City, UTAH
    Posts
    2,064

    Default

    I suspect the problem is a missing WIN32 macro. This macro used to be defined by default for any Windows projects in VS, but that no longer appears to be the case in VS2015. This macro is used in FECore for conditional compilation on different OS. So, try adding it manually and recompile the plugin. To add it, go to the Properties page of the plugin project. In the Properties dialog box, go to Configuration Properties -> C/C++ -> Preprocessor. Then add WIN32 to the Preprocessor Definitions. (Note you have to do this for both Debug and Release configurations). Let me know if that worked.

    Cheers,

    Steve
    Department of Bioengineering, University of Utah
    Scientific Computing and Imaging institute, University of Utah

  6. #6
    Join Date
    Mar 2019
    Posts
    9

    Default

    Thank you so much Steve, It solved my problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •