远程主机无法编译,但应该可以
我正在使用 Netbeans,并使用远程计算机作为开发主机。
如果最后一个设置为 localhost
一切都会正常,但是当我移动到远程计算机时,我会出现以下错误(它实际上与输出的一样)。
唯一的区别是我的本地不是 64 位,而另一个是 64 位。
如果我使用与我提供的 Netbeans 项目相同的 makefile
在远程计算机上构建项目,则不会有任何问题。 即使当我尝试向库提供硬编码的文件路径时,它也不起作用。
出了什么问题,你能帮我解决吗?
最好的问候
AFG
../../../ix/libmylib.so.1.0: undefined reference to `xmlCleanupParser@LIBXML2_2.4.30'
../../../ix/libmylib.so.1.0: undefined reference to `xmlDictCleanup@LIBXML2_2.6.18'
../../../ix/libmylib.so.1.0: undefined reference to `xmlDocGetRootElement@LIBXML2_2.4.30'
../../../ix/libfix.so.1.0: undefined reference to `__asprintf_chk@GLIBC_2.8'
../../../ix/libfix.so.1.0: undefined reference to `__vasprintf_chk@GLIBC_2.8
I am using Netbeans and I am using a remote machine as Development host.
If this last is set to localhost
everything builds fine, BUT when I move to the remote machine I have the error below ( it is really as it is outputted ).
The only difference is that my local is not 64 bit while the other one it is.
If I build the project on the remote machine using the same makefile
I provided my Netbeans project I don't have any issue.
Even when I try to provide the libraries with the file path hardcoded it doesn't work.
What's wrong and can you help me in fixing it?
Best Regards
AFG
../../../ix/libmylib.so.1.0: undefined reference to `xmlCleanupParser@LIBXML2_2.4.30'
../../../ix/libmylib.so.1.0: undefined reference to `xmlDictCleanup@LIBXML2_2.6.18'
../../../ix/libmylib.so.1.0: undefined reference to `xmlDocGetRootElement@LIBXML2_2.4.30'
../../../ix/libfix.so.1.0: undefined reference to `__asprintf_chk@GLIBC_2.8'
../../../ix/libfix.so.1.0: undefined reference to `__vasprintf_chk@GLIBC_2.8
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在使用相对路径进行链接,并且链接失败(不是编译)。将库复制到正确的路径,或者修复您的 makefile。
You are using relative paths to link, and the linking fails (not compilation). Either copy the libraries to correct path, or fix your makefile.
我终于找到了收到该错误消息的原因。在项目窗口下,
我还包含了包含我需要链接的共享库的目录。
也正因为如此,共享库在构建时被发送到远程服务器。它是一个 32 位共享库,而我需要远程构建一个。
每次在我的项目之前,我都添加了一个专门用于该共享库构建的项目。
I found finally the reason why I got that error message. Under the project windows
I also included the directory containing the shared library I need to link.
Because of that also, the shared library was send to the remote server at build time. That it was a 32-bit shared library while I need one build remotely.
I added a project just for that shared library building each time before my project.