masroore / CurlSharp

CurlSharp - .Net binding and object-oriented wrapper for libcurl.
BSD 3-Clause "New" or "Revised" License
182 stars 71 forks source link

WinSamples can not work #23

Closed chucklu closed 8 years ago

chucklu commented 8 years ago

CurlSharp\Samples\WinSamples\WinSamples.csproj this project missing libcurl.dll

When I copy the libcurl.dll from CurlSharp\libs\i386 still can not load the dll

chucklu commented 8 years ago

System.DllNotFoundException was unhandled HResult=-2146233052 Message=无法加载 DLL“libcurl”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。 Source=CurlSharp TypeName="" StackTrace: 在 CurlSharp.NativeMethods.curl_global_init(Int32 flags) 在 CurlSharp.Curl.GlobalInit(CurlInitFlag flags) 位置 D:\SourceCode\GitHub\CurlSharp\CurlSharp\Curl.cs:行号 75 在 WinSamples.FormGetSource.buttonGetSource_Click(Object sender, EventArgs e) 位置 D:\SourceCode\GitHub\CurlSharp\Samples\WinSamples\FormGetSource.cs:行号 18 在 System.Windows.Forms.Control.OnClick(EventArgs e) 在 System.Windows.Forms.Button.OnClick(EventArgs e) 在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) 在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.ButtonBase.WndProc(Message& m) 在 System.Windows.Forms.Button.WndProc(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) 在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) 在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) 在 System.Windows.Forms.Application.Run(Form mainForm) 在 WinSamples.Program.Main() 位置 D:\SourceCode\GitHub\CurlSharp\Samples\WinSamples\Program.cs:行号 18 在 System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) 在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) 在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 在 System.Threading.ThreadHelper.ThreadStart_Context(Object state) 在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) 在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 在 System.Threading.ThreadHelper.ThreadStart() InnerException:

chucklu commented 8 years ago

finally,I find i should copy the dll under i386 folder all by myself to the Debug folder ,and set the project target framework to x86,

benrivero commented 7 years ago

I do that but its not working. My Windows is X64... its something about that?

chucklu commented 7 years ago

@benrivero no,my computer is x64. And it works for me.