Windows exe for ncremap nco tools - nco

I can obtain windows exes for nco tools from here: http://nco.sourceforge.net/#Executables but the ncremap exe is not available within that package. Is there anywhere else I can get the ncremap windows exe from?

Unlike the other NCO operators, ncremap and ncclimo are scripts, not binary executables. Hence they only work in a POSIX environment, i.e., not from a Windows shell prompt, so they are not packaged with the other Windows binaries. As scripts they can be copied straight from the source code, though, e.g. ncremap, and should work in a Cygwin or other UNIX-emulating shell.

Related

Compiling my C++ exe for Linux with VS2019

I have created a C++ standalone exe with VS2019.
This exe uses 1 external ressource file.
This exe creates WAV files.
It does not use any special libraries.
I have been asked if this application runs under Linux, too.
What would I have to do / check to see if / how I can compile my application for Linux, and would that be possible using VS2019?
Thank you very much for the help.
ps: Here is a screenshot of the properties of my project:
Usually to build C++ applications for Linux, you must first use a compiler that will build for the target OS. In this case VS2019 (and it's associated compiler) builds executables for Windows only.
If you're trying to target Linux, you have two options:
You can move over to a Linux system and build your project with the GNU c++ compiler (I recommend using CMAKE to build your project since it's not tied to any particular IDE and can generate makefiles for gcc). https://cmake.org/cmake-tutorial/
You can install the Windows Subsystem for Linux (WSL) and do a remote build with VS2019. You'll see more and more of this these days in production environments. https://devblogs.microsoft.com/cppblog/linux-development-with-c-in-visual-studio-2019-wsl-asan-for-linux-separation-of-build-and-debug/
Hope this helps!

Importing a GNU/Linux C++ package into Visual Studio on Windows

I have no experience with Linux, so this question might seem weird.
I am trying to use a c++ toolbox which has been developed on Debian GNU/Linux Lenny. According to the authors it should work on any recent Linux distribution. However, I need to import it into Visual Studio on Windows.
I have no idea how to get this package configured and built on Visual Studio. I see that there is a "configure" file in the package, but I don't how to use it on Windows. Any help would be appreciated.
You can use either MinGW or Cygwin to mock a *nix system enough to build most *nix software. The configure script is generally a (*nix) shell script which will check to see what interfaces and libraries are available to the application during compilation.
Depending on the library you may not be able to use it outside of a unix library, especially if the library depends on the POSIX (*nix) APIs beyond the very small set which Windows provides.
From your information the package is meant for linux.
This means that if the package contains precompiled code (such as .so or .a - shared libraries / static libraries)you will not be able to run it under windows no matter what (make abstraction of Linux simulated enviroments, I believe you want to run it on a Windows environment).
If the package contains only sources, then you can include the package inside your solution (I would personally go with a static library approach) and try to compile it. You will get some errors when linux specific headers are included (for example linux threading headers).
After finding the windows equivalent for those functions you will be able to compile and use the package on windows as well.
You basically have to do a manual port.

Convert Unix Executable to Windows Executable

I compiled and ran a C++ program using Eclipse on my MacBook Pro. I now need to convert the Unix executable to a windows executable. How do I go about this? Specifally, how do I get this code to run on a Windows machine from the command prompt?
The only way you can get the unix executable to run on a Windows system is using a virtual machine (Something like VMWare or VirtualBox). This isn't REALLY running it on Windows, of course, it's setting up a UNIX system on Windows and running it on that UNIX system.
The executables (and the needed runtime environment) are vastly different between the two systems, you can't just run executables from one on the other.
Your only other option is to setup Eclipse on your Windows system and compile the application there.
You cannot "convert" an executable, you need to recompile for your target system. If you are using a GCC toolchain that is set up for Eclipse and there is no Mac specific code, it should be as easy as moving the project over, setting it up in Eclipse, and recompiling it. If that is too much of a hassle, you can consider setting up a Makefile and using MingW or Cygwin, or even Visual Studio if you'd like. If there is Mac specific code, then you need to look up the appropriate Windows documentation, or use something cross-platform like GTK+ or Qt.

Run cygwin-compiled c++ programs on linux

I would like to compile a c++ program in cygwin (on windows) and then run it on a Linux machine.. The reason I don't want to just compile it on Linux is missing libraries, and a huge mess (including restricted access) to install these.
I was hoping I could just compile it, then copy the programname.exe-file to my linux folder and then run ./programname. But that doesn't work. Is there any way to do this?
Short answer is: You can't.
Longer answer: You can, but then you have to set up a cross-compiler that generates native Linux binaries. Or use an environment such as WINE in Linux.
The reason you can't just copy an executable file from Windows, even when compiled with GCC, is that the file have a specific format that is not seen as executable on Linux.

How to compile C++ application for Unix/Linux in Windows

I have an application written in C++ using wxWidgets. How can I compile it for Linux and Unix os like Debian, FreeBSD, CentOS, in Windows?
Thanks!
Not entirely sure if I understood the question, but I think you are asking if you can compile an application for linux using a compiler in the windows environment.
My short answer: No, but.
The but: You may be able to use Cygwin in windows, however I think there is an easier way. If you are uncomfortable with setting up your computer to have multiple partitions and installing linux on at least one of these partitions, you can use VirtualBox, VMWare, or similar virtualization software to "install" linux on your windows machine. From there you can set up build environments and such. As for how, I would leave your windows build as is, but then in create a Makefile for Linux (or use CMake to replace both your windows-specific builder (the vsproj if using visual studio, etc) and linux-specific builder (make)) so that your source will compile both on windows and linux without having to modify the actual code or project.
i would recommend to use CMake as build system