Compile Unix code for WindowsCE - cygwin

I'm working on a library which was intended to use on Linux-only machines. So I choosed GNU autotools for build system and did everything with only Unix-like OSs in mind. After a while, we needed to port the library to Windows. Thanks to CygWin everything compiles and works fine. Now we need to provide the library for WindowsCE. Is this possible? I think CygWin does not support WinCE. Do I need to re-write the library for WinCE?

Cygwin does not support WinCE, so you will need to port your code to WinCE APIs.

Related

Use Maven to build cross compilation for mac, window, linux

I wonder if it is feasible to use maven to build cross compilation for mac, windows, and linux. It is for building a ODBC client project. Currently, I have separate make files for 32, 64bit, linux and mac.
Please, offer any advantages and disadvantages you might think of.
We use C/C++, gcc49, gdb.
Thank you so much.

Use windows dll libraries in go, compiled for linux and mac os x

I just wonder is there a chance to use proprietary windows dlls in my go project, compiling for mac osx and linux?
No, you can't use windows dlls on Linux / OSX.
However if you really really have to do that, you could always ship your software with a pre-compiled wine like TeamViewer does and few "almost-native" games on Steam.
I have not used Go! to much, but assuming these are the same kinds you would use in c++, then no, you cannot do this natively. You would need to use something such as wine (I am not sure if that builds on mac osx though)

Can I compile and run a linux app C++ source on Windows?

I have source code for a linux application. It seems I can compile it on windows with CygWin. My question is, after compilation, can I run it on Windows?
Depends totally on what APIs you use. If you stick to C standard library things, like <stdio.h>, <stdlib.h>, etc. then yes, you can just compile and run on either OS. Or for C++ apps, there is the Standard C++ Library, which any OS / development environment should provide.
If you use any OS-specific APIs, then of course it will not be compatible with another OS. There are libraries however, like APR that try to abstract out the OS-specific bits.
From a casual glance at the code you've linked to, it appears to not use any OS-specific APIs. However:
Note that this code requires the Gnu Scientific Library, http://www.gnu.org/software/gsl/
you'll need to get that library installed as well.
The simple answer is yes; if you can compile a Linux application with Cygwin, then the compiled application will run on windows. Cygwin provides windows implementations of many unix system functions and libraries.
Cygwin/mingw(http://www.mingw.org/) should have most of the tools you need to build the binary. Once the build succeeds, you can run the binary (only) on windows.

Can i use windows libraries in linux and vice versa?

As per my knowledge, windows uses .lib and .dll extension for libraries and linux uses .a and .so. I am working on a project in ubuntu for manipulation with jpeg image files. so i want to know if these libraries can be used interchangeably in linux and windows? for example if have created example.so library in ubuntu and now i want to use it in some compiler in windows...
If you're planning on running under Wine, then yes.
Otherwise the chances are small. Windows DLLs will most probably use Windows APIs not available on Linux. Even if they're not the DLLs are built for use with compilers running on Windows.
Why not use imagemagick? http://www.imagemagick.org/script/index.php

How can I compile my Windows program into a single Linux binary that runs with Wine?

Just today i checked my ubuntu with installing wine in it ,
Delphi 3 to 7 worked perfectly (Rad studios did not work because they use .net scraps).
But all of the application i made worked perfectly!!!!!
And i heard that it also works well in mac with WineBottler
Is it possible to create a header linux executable and put my vcl application and requird wine stuff into it and distribute as a single executable (.bin)
there is(was) a solution for Linux from Borland, called Kylix. Kylix is based on some older Qt-stuff.
But I would give FreePascal/Lazarus a try, it's pretty cool! and the compiler compiles for many different platforms.
I guess this is what winelib is for. However I have never tried it. (Wasn't Kylix Delphi + winelib compiled for Linux?)
Since Wine is now stable (reached the 1.0 version some time ago), it could make sense to ask the user to install it using its Linux packages manager. It's very fast and easy. So Wine will be always up to date, according to the distribution used.
Then it's very easy to install any Windows program with Wine.
Since Delphi executables are mostly self-contained (if you don't use the BDE or some external database libraries), your clients will install your Delphi application alla "Windows" way, that is, by running a Setup program from Wine.
And it will work fine, as is.
Using WineLib is not a good idea, even not advised by Wine developers, as far as I remember. At least for closed-source software: in one or two years, perhaps you won't release another version of your program, but Wine and WineLib will have evolved a lot... If you use Wine as an external package, your client can be sure there will be some end user enhancements.
If your software is purely Open Source, then using WineLib could make sense. But even the WineLib headers can evolved, so perhaps your source won't evolve at the same speed...

Resources