User Tag List

Results 1 to 9 of 9

Thread: Error finding the DLL in the final build

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    May 2007
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error finding the DLL in the final build

    Hi, guys.

    I'm building a little test extension here and I'm having a problem. I use an external DLL file and I configured the linker to point to the DLL's lib. In edit time, everything runs fine if I put the DLL in either:

    1) System32 folder;
    2) Data/Runtime folder;
    3) MMF2 main folder;

    But when I build the application, I'd like to make it run with DLL being in the same folder as the built application. But the extension refuses to load stating that an external library is missing. Again, if I put the DLL into System32 folder, it works flawlessly.

    Do you guys know what could be causing this? Perhaps some linker option I did not set(I'm not too experienced with Visual C++)?

    Thank you for your time.

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Error finding the DLL in the final build

    MMF extracts the EXE your extension will run from to a temporary folder before executing it. You need to implement the GetDependencies function (General.cpp).

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    May 2007
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Error finding the DLL in the final build

    As soon as I get home, I'll do as you adviced.
    Thank you, Jamie.

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    May 2007
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Error finding the DLL in the final build

    Hmm... after editing the code to this:

    Code:
    LPCSTR* WINAPI DLLExport GetDependencies()
    {
    	// Do some rSDK stuff
    	#include "rGetDependencies.h"
    	
    	LPCSTR szDep[] = {
    		"sqlite3.dll", NULL
    	};
    
    	return szDep;
    }

    ...I get an error message while building the application in MMF2:

    D:\Arquivos de Programas\Multimedia Fusion 2\Data\Runtime\□ contains an invalid path.
    The DLL is both inside MMF2 main directory and in the Runtime folder as well.

    What am I doing wrong?

  5. #5
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Error finding the DLL in the final build

    Take out the NULL at the end.

  6. #6
    Clicker Fusion 2.5 Developer

    Join Date
    May 2007
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Error finding the DLL in the final build

    I've been trying several ways. This:

    Code:
    LPCSTR szDep[] = {
    		"sqlite3.dll"
    	};
    will show this message:

    D:\Arquivos de Programas\Multimedia Fusion 2\Data\Runtime\™UP was no found.
    Thank you for your help so far. :/

  7. #7
    Clicker Fusion 2.5 Developer

    Join Date
    May 2007
    Posts
    548
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Error finding the DLL in the final build

    I figured it out, Jamie.
    I had to move the variable declaration and association of szDep outside of the GetDependencies function. Visual C++ kept complaining about returning pointers to local variables. You might want to update your General.cpp. It took me hundreds of compilation tries before realising. Thank you for all your kind help.

  8. #8
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Error finding the DLL in the final build

    Yeah, the method I showed here has szDep outside of the function for just that reason.
    .:::.Joshtek.:::.

  9. #9
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Error finding the DLL in the final build

    Wow, how didn't I spot that?

    Yes, I will update it in rSDK.

Similar Threads

  1. Build final app without zipping files
    By Renatos in forum iOS Export Module Version 2.0
    Replies: 2
    Last Post: 11th August 2011, 10:31 AM
  2. TGF2 Build #249 - Final Version
    By Yves in forum The Games Factory 2 - Technical Support
    Replies: 0
    Last Post: 17th June 2010, 02:24 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
  •