在Raspberry Pi上编译Unicorn Linux C API 4
我正在尝试在Raspberry Pi 4上编译该GitHub存储库18.04。该代码写在C ++上。
“ 行为示例中的行:
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++.
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论