-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to compile the cpp file? #30
Comments
Need cmake
See https://github.com/hughperkins/EasyCL#procedure-1
…On Fri, Jun 15, 2018, 04:57 李昊 ***@***.***> wrote:
Sorry, I'm a new man.
I think I should do something to compile the cpp file to executable file?
Should I need a Makefile?
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#30>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHiqGMUvpLMR6gCn0RUagnQPKl7i_xZks5t83b3gaJpZM4UpOyW>
.
|
Yes, I did it as instructed. And then |
Do you have ../dist/bin/easycl_unittests ?
https://github.com/hughperkins/EasyCL#how-to-run-self-tests
…On Fri, Jun 15, 2018, 05:26 李昊 ***@***.***> wrote:
Yes, I did it as instructed. And then source
../dist/bin/easycl_activate.sh to set environment variables. However, if
i want to try the testeasycl.cpp, should I run g++ testeasycl.cpp? How
could I run this demo?
Thanks very much.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHiqKlanmTQO7tB7pWQTWldLU-v9b8Oks5t8327gaJpZM4UpOyW>
.
|
No... there is my tree in dist dir
What i did is just https://github.com/hughperkins/EasyCL#procedure-1 |
here is my |
`ccmake ..` , change `BUILD_TESTS` to 'ON'
…On Fri, Jun 15, 2018 at 5:38 AM, 李昊 ***@***.***> wrote:
here is my uname -a
Linux geek-Lenovo-G40-70 4.13.0-45-generic #50~16.04.1-Ubuntu SMP Wed May
30 11:18:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHiqML5wFpnE9BZr5a4rC4gviFCTZ1hks5t84CYgaJpZM4UpOyW>
.
|
in the root of this repo. But it not work, it report error like this:
Looking forward to your help |
Testeasycl.cpp is compiled into easycl_unittests. It is the Testeasycl.main
test
…On Fri, Jun 15, 2018, 06:04 李昊 ***@***.***> wrote:
../dist/bin/easycl_unittests appears~
It works when i run LD_LIBRARY_PATH=../dist/lib ../dist/bin/gpuinfo and LD_LIBRARY_PATH=../dist/lib
../dist/bin/easycl_unittests.
Thank you very much~~
But if I want to test the test/testeasycl.cpp, what should I do ?
I do
g++ test/testeasycl.cpp -std=c++11 -Ithirdparty/gtest -Idist/include/easycl -I/home/geek/Proj/Intel/Install/hld/host/include/ -I.
in the root of this repo. But it not work, it report error like this:
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
/tmp/cco6nYnD.o: In function `testeasycl_main_Test::TestBody()':
testeasycl.cpp:(.text+0x3f): undefined reference to `easycl::EasyCL::isOpenCLAvailable()'
testeasycl.cpp:(.text+0x8d): undefined reference to `easycl::EasyCL::createForFirstGpuOtherwiseCpu()'
testeasycl.cpp:(.text+0x164): undefined reference to `easycl::EasyCL::buildKernelFromString(std::__cxx11::basic_string<char, std::char_traits<char>, s
td::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_tra
its<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool)'
testeasycl.cpp:(.text+0x230): undefined reference to `easycl::CLKernel* easycl::CLKernel::input<float>(int, float const*)'
testeasycl.cpp:(.text+0x248): undefined reference to `easycl::CLKernel* easycl::CLKernel::output<float>(int, float*)'
testeasycl.cpp:(.text+0x286): undefined reference to `easycl::CLKernel::run(int, unsigned long const*, unsigned long const*, bool)'
testeasycl.cpp:(.text+0x2a1): undefined reference to `assertEquals(float, int)'
testeasycl.cpp:(.text+0x2bc): undefined reference to `assertEquals(float, int)'
Looking forward to your help
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHiqJvn0Yq7OfPPDt9uE70N7978VJRqks5t84a_gaJpZM4UpOyW>
.
|
Oh, no wonder, thanks very much. |
:)
…On Fri, Jun 15, 2018, 06:29 李昊 ***@***.***> wrote:
Oh, no wonder, thanks very much.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#30 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHiqHKAveRFqgtMzK3yB8BcI-hhPaUSks5t84yRgaJpZM4UpOyW>
.
|
Sorry, I'm a new man.
I think I should do something to compile the cpp file to executable file?
Should I need a Makefile?
Thanks
The text was updated successfully, but these errors were encountered: