cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

scharupa
Staff

Cross-compilation, generating windows binaries on a linux Box failed for OpenCL

I need small help on  Cross compilation. I am trying to generate windows binaries on a Linux Box using Ming64 compiler, and everything was fine with setup.

The issue is, I getting following error when I try to compile a OpenCL application, it’s not able to find libOpenCL.so even though libraries copied to linux box.

Could you please me with it? Attaching OpenCL application

#x86_64-w64-mingw32-g++ -m64 -O3 main.cpp bhsparse.cpp bhsparse_opencl.cpp basiccl.cpp -L/usr/lib -lOpenCL -o spgemm -w

/usr/bin/x86_64-w64-mingw32-ld: cannot find -lOpenCL

collect2: error: ld returned 1 exit status

make: *** [all] Error 1

0 Likes
1 Solution

Please you with it? Sure I can try

I do not have any such mingw experience. But I'm good with Linux. I gather you try to build windows binaries in an Ubuntu 14.04 box.

Which SDK are you using and where is it located? Link against that with <-L/opt/windows/SDK...> in your linking.

BTW I can't find any "tests" directory in the SDK. Do you mean "samples"?

View solution in original post

3 Replies
scharupa
Staff

To be more specific, the issue happens only with OpenCL tests/source... I was able to cross-compile my regular C/C++ source.

Any one experimented with Cross compilation for OpenCL tests? Does it work.

Mine is Ubuntu 14.04, 64bit OS

0 Likes

Hi Srinivas,

I've white-listed you, so you should be able to directly post in the relevant dev forum. As this post seems relevant to the OpenCL forum, I'm moving it there.

--Prasad

0 Likes

Please you with it? Sure I can try

I do not have any such mingw experience. But I'm good with Linux. I gather you try to build windows binaries in an Ubuntu 14.04 box.

Which SDK are you using and where is it located? Link against that with <-L/opt/windows/SDK...> in your linking.

BTW I can't find any "tests" directory in the SDK. Do you mean "samples"?