- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试使用 ZeroMQ C# 绑定(bind) ( http://www.zeromq.org/bindings:clr ) 与我在 Unity 中创建的游戏的服务器进行通信(我使用的是 Mac OS X 10.8)。因此,我创建了一个连接到服务器、发送消息然后接收消息的简单函数:
using UnityEngine;
using System.Runtime.InteropServices;
using System.Collections;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZeroMQ;
public class NetworkZero : MonoBehaviour {
// Use this for initialization
public static NetworkZero instance;
void Start () {
instance = this;
Debug.Log("START NETWORK COMMUNICATION");
}
// Update is called once per frame
void Update () {
using (ZMQ.Context context = new ZMQ.Context(1))
using (ZMQ.Socket client = context.Socket(ZMQ.SocketType.REQ))
{
string sendMSG = "CLIENT";
client.Connect("tcp://localhost:31415");
client.Bind("tcp://localhost:31415");
client.Send(sendMSG, Encoding.Unicode);
string message = client.Recv(Encoding.Unicode);
Debug.Log("Received request: " + message);
}
}
}
我按照说明将必要的库包含在我的项目中,并在 monoDevelop 中添加了对这些库的引用。但是当程序构建时,当我尝试运行程序时仍然出现以下错误:
DllNotFoundException: libzmq
ZMQ.Context..ctor (Int32 io_threads)
NetworkZero.Update () (at Assets/SLIP/NetworkZero.cs:26)
有人有什么建议吗?
最佳答案
确保已将引用程序集的“复制本地”设置为 true。
关于c# - DllNotFoundException:libzmq,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13347156/
我在某些 Windows 机器上的独立构建中遇到 DLLNotFoundException,其他机器则运行良好。 Dll文件肯定在plugins文件夹中,也将其复制到projectName_Data文
我正在尝试使用 ZeroMQ C# 绑定(bind) ( http://www.zeromq.org/bindings:clr ) 与我在 Unity 中创建的游戏的服务器进行通信(我使用的是 Mac
我正在尝试在我的统一项目中使用一个 Assets ,它有一个 c# script.cs,它在游戏开始时调用并初始化插件。但是当我按下播放按钮时,unity 不断抛出 DllNotFoundExcept
我的 WPF 应用程序运行良好,但当我将它部署为 ClickOnce 应用程序时,它甚至无法启动。但在 Windows 事件查看器中抛出了以下异常: Application: Saito ERC-C.
我正在尝试在 EmguCV 3.1 中运行 LicensePlateRecognition 示例。但我总是收到错误 System.DllNotFoundException 并且消息是“无法加载 cve
我卸载了 Xamarin Studio(因为 xamarin 是免费的)并尝试在 VS 上运行我的应用程序,但收到此错误: System.DllNotFoundException: java-inte
我已经安装了版本1,1,1的Microsoft.Data.Sqlite Nuget包(因为我有Visual Studio 2015并且不支持2.0.0)。在 x86 和 x64 中一切正常,但问题出现
每当我的应用程序尝试使用 DLL 中存在的函数时,我会收到一个 .dll 的 System.DllNotFoundException,它与可执行文件位于同一文件夹中。奇怪的是,它只发生在一个用户的 P
我是 MonoDevelop 工具的新手。请有人帮忙解决这个问题。 当我尝试连接到 MySql DB 时收到此错误(但是我可以通过终端进行连接)。我在 ubundu 14.4 上运行 mono。 Sy
我正在尝试运行从中导入的 Assets https://www.assetstore.unity3d.com/en/#!/content/10693 它在 windows 中运行良好,但我在 Linu
我在我的 Windows 窗体应用程序中集成了 Geckofx45.64 - 在某些 Windows10 发行版上,我在启动后立即收到以下错误: System.DllNotFoundException
当我们在程序中加载 DLL 时出现以下错误并抛出以下错误: Unable to load DLL 'xxx.dll': The specified procedure could not be fou
这是我第一次尝试为 Android/iOS 创建一个库 c++。 我正在使用 Visual Studio 2015 - Xamarin。 首先我创建了一个项目:Visual C++ -> 跨平台 ->
我在尝试从我的应用程序(用 C# 框架 4.0 编写)中使用非托管代码 dll 时遇到了一些困难。我正在使用 dll 导入如下 [DllImport(@"C:\MGW_SDK.dll", EntryP
我正在使用 Monodevelop 并且有一个 C# 主程序调用一个用 C 编写的共享对象文件。解决方案构建成功,但是当我尝试运行它时,我得到上面的 System.DllNotfoundExcepti
所以我使用了一个用于硬件随机数生成器的 SDK,它提供了一个名为 PsyREG.dll 的 dll 用于与其交互,以及一些用于使用 dll 中的方法的 c# 源代码。 它在过去有效,但不知何故它已停止
我能够在我的开发箱上构建和执行我的 Winforms 应用程序,但是当我尝试在另一个干净的箱子(虚拟机)上运行我的应用程序时,我遇到了这个错误。 Application: MyApp.exe Fram
我是 Unix/Linux/Ubuntu 的新手。 我正在将 Mono 与 VB 一起使用,我正在尝试通过 DllImport (CliSiTef32I.dll/libclisitef.so) 使用库
当尝试将单声道应用程序捆绑在 snap 包中时,当应用程序尝试发出简单的 HTTP 请求时,我会收到此异常: System.AggregateException: One or more errors
我使用 ARFoundation 包在 Unity 中构建了一个 ARCore 应用程序。然后我按照以下链接中的说明将 Unity 应用程序嵌入到原生 Android 应用程序中:Embedded U
我是一名优秀的程序员,十分优秀!