cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

scharupa
Staff
Staff

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

Jump to solution

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

Accepted Solutions
nibal
Challenger

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

Jump to 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
Staff

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

Jump to solution

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
pinform
Staff
Staff

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

Jump to solution

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
nibal
Challenger

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

Jump to 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