如何在MonoDevelop中添加外部引用? [英] How to add external references in MonoDevelop?

查看:309
本文介绍了如何在MonoDevelop中添加外部引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了名为。


I've downloaded a charting library called NPlot and I have no idea how to add it as a reference in a GTK# application I'm currently making in MonoDevelop. There is no option in the Edit References window that you could add an external reference apart from the listed ones.

How do you add an external reference in MonoDevelop?

解决方案

Being fairly new to Ubuntu (consequently, to using apps), I found it quite challenging to grapple with the dilemma above. After hours of searching (almost half a day actually), I found the answer. I created this post for others who might be facing this problem too.

Before proceeding, make sure you have your dll file to add as a reference.

First, create a .pc file containing the following:

Name:  
Description:  
Version:  
Libs: -r:<where your dll is>

Example:

Name: NPlot
Description: Creates charts.
Version: 0.9.9.2
Libs: -r:/home/xxx/Downloads/NPlot/nplot-gtk-0.9.9.2/NPlot.dll

Hat tip to this site.

Remember where you've saved your .pc file. I've saved my file in /home/xxx/Documents. Next, copy the .pc file to /usr/lib/pkgconfig. I'm not sure with other Linux distros, but Ubuntu is preventing me to directly copy paste the file to the folder, so I have to use this command on the terminal:

sudo cp <source> <destination>

Example:

sudo cp /home/xxx/Documents/NPlot.pc /usr/lib/pkgconfig

It is now included in the Edit References window.

If the reference does not show, please refer to this question.

这篇关于如何在MonoDevelop中添加外部引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆