cross compile in windows for linux

Hello,

I am new with nvcc.
Is it possible to build application in windows, cross building with nvcc, and then run the binary in linux ?
We need to build in eclipse (windows) and run & debug a remote linux.

Thank you,
Ran

It’s not a supported toolchain/process.

It should be possible to run a VM in windows that hosts linux, and build there.

Hi txbob,

Thank you.
If I understand correctly, nvcc for windows should be used (build+run binary) only in windows, and nvcc for linux only in linux(build+run binary) , Right ?

One more thing if I may.I see that it has dgb, gdbserver support.

So If I use the VM on windows, do you think it should it be possible to use eclipse in VM, and debug/deploy a remote traget ?

Thanks a lot!
Ran

If you use nsight eclipse edition, it should be possible to use it in the remote fashion that is supported:

[url]http://docs.nvidia.com/cuda/nsight-eclipse-edition-getting-started-guide/index.html#remote-development[/url]

Thank you,
I followed the documentation, and it is very interesting eclipse version.
Though, not sure what the additional value between this eclipse version, to just configuring a toolchain in any other eclipse version.

BR,
Ran

Is CUDA cross compilation Windows → Linux still impossible?

NVIDIA doesn’t provide any tools for this.

With the advent of WSL2, you can compile for linux using WSL2.

Yes I am evaluating this approach too. Unfortunately I couldn’t find an an easy way of integrating CUDA remote builds in the WSL environment for Visual Studio / MSBuild. Something like the CUDA target file that needs to be included in C++ projects to enable CUDA support…