在Raspberry Pi上编译Unicorn Linux C API 4

发布于 2025-01-24 05:34:02 字数 1703 浏览 2 评论 0原文

我正在尝试在Raspberry Pi 4上编译该GitHub存储库18.04。该代码写在C ++上。

https://github.com/unicorn-bi/unicorn-suite-hybrid-black/tree/master/unicorn%20raspberry%20pi%20zero%20w%20w%20c%20c%20api/unicorncapiacquiacquienexpimentexpample

“ 行为示例中的行:

g++ main.cpp -I ../Lib -L ../Lib -lunicorn -o UnicornAcquisitionExample

我会收到以下错误:

/usr/bin/ld: skipping incompatible ../Lib/libunicorn.so when searching for -lunicorn
/usr/bin/ld: cannot find -lunicorn
collect2: error: ld returned 1 exit status

似乎共享库文件不兼容。这很奇怪,因为它也应该在Raspberry Pi 4上运行。我试图复制共享库文件,并且我也尝试在没有它的情况下对其进行编译。我总是会收到以下错误:

/tmp/ccrr59RO.o: In function 'main':
main.cpp:(.text+0xb8): undefined reference to 'UNICORN_GetAvailableDevices'
main.cpp:(.text+0x140): undefined reference to 'UNICORN_GetAvailableDevices'
main.cpp:(.text+0x300): undefined reference to 'UNICORN_OpenDevice'
main.cpp:(.text+0x3e8): undefined reference to 'UNICORN_GetNumberOfAcquiredChannels'
main.cpp:(.text+0x3f4): undefined reference to 'UNICORN_GetConfiguration'
main.cpp:(.text+0x53c): undefined reference to 'UNICORN_StartAcquisition'
main.cpp:(.text+0x5e0): undefined reference to 'UNICORN_GetData'
main.cpp:(.text+0x654): undefined reference to 'UNICORN_StopAcquisition'
main.cpp:(.text+0x6fc): undefined reference to 'UNICORN_CloseDevice'
collect2: error: ld returned 1 exit status

我不确定是否应该尝试复制共享库文件或没有它的情况,但是在任何一种情况下,我都会始终获得以下错误。如何在Raspberry Pi 4上的GitHub中编译该示例?

I am trying to compile this github repository on a Raspberry Pi 4 running Ubuntu 18.04. The code is written on c++.

https://github.com/unicorn-bi/Unicorn-Suite-Hybrid-Black/tree/master/Unicorn%20Raspberry%20Pi%20Zero%20W%20C%20API/UnicornCAPIAcquisitionExample

When I run the following line as in the example:

g++ main.cpp -I ../Lib -L ../Lib -lunicorn -o UnicornAcquisitionExample

I get the following error:

/usr/bin/ld: skipping incompatible ../Lib/libunicorn.so when searching for -lunicorn
/usr/bin/ld: cannot find -lunicorn
collect2: error: ld returned 1 exit status

It seems the shared library file is not compatible. This is weird since it should run also on the Raspberry Pi 4. I have tried to replicate the shared library file and I have tried to compile it also without it. I get always the following error:

/tmp/ccrr59RO.o: In function 'main':
main.cpp:(.text+0xb8): undefined reference to 'UNICORN_GetAvailableDevices'
main.cpp:(.text+0x140): undefined reference to 'UNICORN_GetAvailableDevices'
main.cpp:(.text+0x300): undefined reference to 'UNICORN_OpenDevice'
main.cpp:(.text+0x3e8): undefined reference to 'UNICORN_GetNumberOfAcquiredChannels'
main.cpp:(.text+0x3f4): undefined reference to 'UNICORN_GetConfiguration'
main.cpp:(.text+0x53c): undefined reference to 'UNICORN_StartAcquisition'
main.cpp:(.text+0x5e0): undefined reference to 'UNICORN_GetData'
main.cpp:(.text+0x654): undefined reference to 'UNICORN_StopAcquisition'
main.cpp:(.text+0x6fc): undefined reference to 'UNICORN_CloseDevice'
collect2: error: ld returned 1 exit status

I am not sure if I should try to replicate the shared library file or doing without it but in either case I get always the following error. How can I compile the example in the github on the Raspberry Pi 4?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文