#4 Unable to load DLL 'wx-c-0-9-0-2'

closed
nobody
None
9
2011-08-22
2011-08-22
Noah
No

I'm trying to get WX.Net working with Visual Studio. I've created a very basic sample app but when I run it, VS complains:

Unable to load DLL 'wx-c-0-9-0-2': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I have a reference to WX.dll.NET added to my project. I tried using regsvr32 but that didn't work. Running VS as admin didn't work either. Any ideas? It'd be great if there was more documentation on how to "install" things (even if there's no real installation to do).

Thanks!

My sample app:
using System;
using System.Drawing;
using wx;

public class MainForm : wx.Frame
{
public MainForm()
: base("Test Application", new Point(0, 0), new Size(100, 100))
{
}
}

public class MainApp : wx.App
{
public override bool OnInit()
{
MainForm mainForm = new MainForm();
mainForm.Show(true);
return true;
}

[STAThread]
static int Main(string[] args)
{
MainApp app = new MainApp(); // Exception thrown here
app.Run();

return 0;
}
}

Discussion

  • Noah

    Noah - 2011-08-22
    • priority: 5 --> 9
    • assigned_to: nobody --> harald_meyer
     
  • Noah

    Noah - 2011-08-22

    I should also add that I tried moving wx-c-0-9-0-2.dll to system32 but had no luck.

     
  • Harald Meyer auf\'m Hofe

    • assigned_to: harald_meyer --> nobody
    • status: open --> closed
     
  • Harald Meyer auf\'m Hofe

    The .NET-Framwork (PInvoce) expects native DLLs to exist in the directory of the application domain. VS-projects copy assembly references into the directory where the compiled program is created. However, VS-projects do not care about additionally required native DLLs.
    You can tell your project to copy also the native DLL. Add the DLL to the files of your project and add a build action to the DLL telling MSBuild to copy the file if newer.
    I have not yet investigated the effects of installing the DLL to system32. Thus, I cannot give any advise concerning this issue.
    The standard application to investigate dynamic link problems involving the .NET-Framework is FUSLOGVW.exe. This tool is shipped with the platform SDK and, possibly, with professional Visual .NET releases.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks