构建错误 - “找不到库” [英] Build error - "could not find library"

查看:77
本文介绍了构建错误 - “找不到库”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Visual Studio Community 2015和Visual Basic,我收到无法找到库的构建错误。它表示我的两个DLL,只有路径的一半。路径的另一半是另一个错误消息,没有提到DLL。这是一个相当大的项目,有很多参考,但这只发生在其中两个。



例如,



找不到库'C:\ Users \ BSmith \Documents\Visual Studio pro'

找不到库'jects \custom controls \ source code \\ \\ obj\CustomProj.dll'



谢谢。

Using Visual Studio Community 2015 and Visual Basic, I get build errors that it can't find a library. It indicates two of my DLLs and only half of the path. The other half of the path is in another error message with no mention of the DLL. It's a fairly large project with a lot of references, but this only happens on two of them.

For example,

could not find library 'C:\Users\BSmith\Documents\Visual Studio pro'
could not find library 'jects\custom controls\source code\obj\CustomProj.dll'

Thanks.

推荐答案

问题解决了。我上面描述的路径是代表问题但不是实际路径,因为真实路径包括一些客户专有名称。如果我可以显示实际路径名称,答案可能是显而易见的。



真实路径包括其中一个文件夹名称中的逗号。这是我在第一时间创建文件夹的坏处,但现在改变已经太晚了。



路径名称的中断强制它分为两行和逗号中出现两条错误消息。在真正的错误消息中,逗号不显示,这也应该是我的线索。



我将两个DLL复制到一个新文件夹之前用逗号,做了一个新的参考,一切都很好。



这对我来说有点麻烦,因为其中一个DLL也来自我自己的VB代码,所以现在我必须记得每当我对该代码进行更改时,将DLL从源文件夹复制到我的新文件夹。但除非有办法让编译器不要使用逗号,否则我只需要接受额外的内务管理。



有趣的是,我的整个项目包含路径中带逗号的文件夹,这是与之相关的唯一两个问题。
Problem solved. The path's that I described above are representative of the problem but are not the actual paths because the real paths include some customer proprietary names. If I could show the actual path names the answer might have been obvious.

The real paths include a comma in one of the folder names. That's my bad for creating the folder that way in the first place but now it's too late to change.

The break in the path names that forces it into two lines and two error messages occurs at the comma. In the real error messages the comma is not displayed and that should have been a clue to me also.

I copied the two DLLs into a new folder ahead of the one with the comma, made a new reference, and all is good.

This is a tiny bit cumbersome for me because one of the DLLs is also from my own VB code, so now I have to remember to copy the DLL from the source folder to my new folder whenever I make a change to that code. But unless there is a way to get the compiler to not puke on the comma, I'll just have to live with that extra housekeeping.

Interestingly, my entire project includes that folder with the comma in the path, and these are the only two problems related to it.


这篇关于构建错误 - “找不到库”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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