User Tag List

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 27

Thread: Odd Issue with DarkEDIF/WIN-EDIF and external libraries

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DracisLooby's Avatar
    Join Date
    Jun 2008
    Location
    Washington, United States
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Odd Issue with DarkEDIF/WIN-EDIF and external libraries

    Was just wondering if there are any rules that would need to be followed when using static/dynamic libraries in extensions?

    Am able to build static libraries into an extension, compile without error, but suddenly MMF2 no longer recognizes them as extensions,
    Whats especially odd, is its only when code is implemented, if I create functions with static libraries, but don't use them, MMF2 sees the extension fine.

    Am I just missing something, or is there something not to obvious I'm missing?

    Does not seem to be with any specific library, I've tried a handful of smaller ones, every one seems to cause the issue.

    Help?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export Module
    conceptgame's Avatar
    Join Date
    Apr 2011
    Location
    Switzerland
    Posts
    783
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I both made extensions with static and dynamic 3rd libraries and both are working for me with the official EDIF.
    For dynamic library, you can add dependencies to build exe with dlls embedded.
    For the static library, you will have problems by linking only if you used the functions. Without seeing your code it is difficult to know why the extension is properly compiled but not recognized by MMF2.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DracisLooby's Avatar
    Join Date
    Jun 2008
    Location
    Washington, United States
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the pointers!
    Could you clarify the static library point, does firing a function from a static library somehow nullify the ext?

    Also, would adding dependancies simply mean adding the DLL's to a MMF2 project as a binary, and extracting on install/runtime?

  4. #4
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    No, there is a function called GetDependencies which MMF2 calls to ask which files (DLLs) your extension is dependent on.

    You can try using Dependency Walker to see what non-standard DLLs your extension is dependent on.
    Working as fast as I can on Fusion 3

  5. #5
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export Module
    conceptgame's Avatar
    Join Date
    Apr 2011
    Location
    Switzerland
    Posts
    783
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    As LB said, there is a GetDependencies function in EDIF SDK, which is already filled in. You only need to add the name of the dlls in the Json file of your extension.
    Something like this:
    "About": {
    "Name": "SoundTouch",
    "Author": "ConceptGame",
    "Copyright": "Copyright (C) 2013 ConceptGame",
    "Comment": "SoundTouch can change the Tempo, Pitch and Playback Rates of audio files",
    "URL": "",
    "Help": "Help/SoundTouch.chm",
    "Identifier": "SNDT",
    "Dependencies":["SoundTouch.dll"]
    },
    DependencyWalker is indeed a good starting point to find the dependencies that are missing.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DracisLooby's Avatar
    Join Date
    Jun 2008
    Location
    Washington, United States
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, didn't even know it was a thing, and I'm having trouble finding docs on GetDependencies, and it seems undefined in general scope, where could I find more info on it?

    EDIT: Missed Conceptgame's reply, will look around on the json, but the default looks to be a bit blank, any examples of adding external-libs/dll to the json?

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,741
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)
    Huh, conceptgame provided an example:

    {
    [...]
    "Dependencies":["SoundTouch.dll","DLL2.dll","DLL3.dll"]
    }

    in the JSON.

    The implementation of this function can be found in Lib/Edif.General.cpp, but I doubt it will be of any use tyou you.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DracisLooby's Avatar
    Join Date
    Jun 2008
    Location
    Washington, United States
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, looks like he edited it in after I asked, thanks for the help, I'll update on next success/failure!

    EDIT: Sweet, thanks for the help guys!

    Just one last question, can MMF2 accept std::string, or is it stuck with char *? Everytime I output to a string, it crashes, and outputting a char * for the library I'm using generally results in random symbols (undefined behavior error), and converting them at run does the same.

    Any advice?

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DracisLooby's Avatar
    Join Date
    Jun 2008
    Location
    Washington, United States
    Posts
    169
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    bump?

  10. #10
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You have to use Runtime::CopyString:

    Code:
    return Runtime.CopyString(MyString.c_str());
    Strings are always passed to and returned from your extension as TCHAR const * type. As a general rule of thumb, everything everywhere in the MMF2 SDK passes data to/from MMF2 in 32-bits. If a parameter or return type is not a 32-bit primitive or pointer, you're doing it wrong.

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. DarkEDIF - Taking suggestions
    By Phi in forum Extension Development
    Replies: 62
    Last Post: 31st May 2014, 08:43 AM
  2. DarkEdif
    By kraminator in forum Extension Development
    Replies: 7
    Last Post: 17th October 2012, 02:07 AM
  3. EDIF bug
    By Phi in forum Extension Development
    Replies: 7
    Last Post: 30th December 2011, 12:56 AM
  4. Interesting EDIF bug
    By Phi in forum Extension Development
    Replies: 0
    Last Post: 10th October 2011, 05:49 PM
  5. Using external libraries
    By Greg in forum Extension Development
    Replies: 2
    Last Post: 13th September 2011, 09:23 PM

Posting Permissions

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