Compiling and using Neo Hookean plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • panta
    Junior Member
    • Jul 2019
    • 2

    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
  • mherron
    Developer
    • Aug 2016
    • 113

    #2
    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

    Comment

    • panta
      Junior Member
      • Jul 2019
      • 2

      #3
      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

      Comment

      • tff
        Member
        • Mar 2019
        • 30

        #4
        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,

        Comment

        • maas
          Lead Code Developer
          • Nov 2007
          • 3638

          #5
          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

          Comment

          • tff
            Member
            • Mar 2019
            • 30

            #6
            Thank you so much Steve, It solved my problem

            Comment

            • tinorance
              Junior Member
              • Jul 2022
              • 3

              #7
              Hi Steve,

              I'm having the same issue for my MacOS

              image.png

              Is this a configuration file issue?

              Best,
              RT

              Comment

              • maas
                Lead Code Developer
                • Nov 2007
                • 3638

                #8
                Hi RT,

                It looks like FEBio was able to load the plugin, but it couldn't find the function GetSDKVersion in it. This is a required function that you need to define in your plugin code (see here for details). So make sure that your plugin code defines this and the other required functions and let me know if that solved the problem.

                Best,

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

                Comment

                Working...
                X