i had developed a tool using gtk in linux. its working fine now i want to make it port to windows? - gtk

For that tool i used glade -3 to build windows in linux and imported inside code using gtk builder, now want to port this tool to windows xp what is best way ?
thanks in advance :)

Install the GTK-all-in-one bundle available on gtk.org. Installation procedure ins included in the README file contained in the bundle. Then, install MinGW on your Windows platform, and use mingw-get (the package management tool), to install msys (a shell). For a 64-bits build, you may use MinGW-64 (which is a fork of MinGW). You then will have a platform for developing on Windows.
I personally used that platform with CMake to successfully build some code sample. Read my answer on How do I link gtk library more easily with cmake in windows? for a CMake + GTK code sample.

Related

How to compile something using arm-none-eabi-gcc on windows

I am trying to build a project for a raspberry pi 4, using windows 10 as the building platform, I have the compiler installed, arm-none-eabi-gcc however every piece of information I've learned about it relates to how to run it on a linux machine, and I don't really want to run a vm just to load the linux environment, so how do I run the compiler on windows 10, Do I run it from Cmd? or is there a different method to do this?
You could check this PreBuilt GNU Toolchain for building natively on Win10.
Otherwise you could also setup a WSL environment in your win10, then you would also be able use any linux toolchains.
You can download the IDE DS-5 Community Edition
https://developer.arm.com/tools-and-software/embedded/legacy-tools/ds-5-development-studio/editions/community-edition
You can download the toolchains:
https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads
Then follow the steps in this tutorial:
https://developer.arm.com/tools-and-software/embedded/legacy-tools/ds-5-development-studio/resources/tutorials/getting-started-with-ds-5-ce-and-armv8-foundation-platform
https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/running-bare-metal-software-on-the-raspberry-pi-3-using-arm-ds-5
You should have the arm-none-eabi-gcc.exe for Windows Compile.
Also, you have the linux environment like MinGW and use installed terminal(xterm).
then, you have to copy the .so files into MinGW /lib or /usr/lib folder under C:/MinGW.
Hope this would be helpful for you.

MinGW or Cygwin GCC?

I want to install a GCC compiler in Windows for the Eclipse IDE. I know there are two options: MinGW GCC or Cygwin GCC. Which one is better for Eclipse CDT? Any experience or suggestions will be appreciated.
Using Cygwin means your program will be dependent on cygwin1.dll, which is essentially a layer that allows POSIX functionality to be used in a Windows environment. Compiling with the standard MinGW GCC provides no such dependancy. This means however, if you intend to compile with MinGW GCC, you will not have access to POSIX functions such as fork() and exec().
For more information on the differences between Cygwin and MinGW, see here.
My offhand thoughts are, if you need cygwin, you need it. For instance compiling programs that were developed for Unix and have symbolic links and shell scripts in the build system.
If you don't need it, you don't want it. And compiling under linux on a virtual machine is often a better choice than going the cygwin route.
So mingw is perfectly fine. Works fine, simple to use.
Also: You might consider codelite (www.codelite.org) instead of Eclipse.
Personally I like Cygwin better, it has a lot of installation options and it feels a lot like the terminal you'll find on a Linux machine. It provides a pretty substantial set of Linux-like capabilities, something that Windows fails at miserably.
Cygwin and Mingw are not interchangeable alternatives. Cygwin is used to compile POSIX API programs, Mingw is used compile Windows API programs.
Chose one or the other depending on what kind program you're going to write.
Wikipedia Says:
MinGW forked from version 1.3.3 of Cygwin. Although both Cygwin and MinGW can be used to port UNIX software to Windows, they have different approaches: Cygwin aims to provide a complete POSIX layer that provides emulations of several system calls and libraries that exist on Linux, UNIX, and the BSD variants. The POSIX layer runs on top of Windows, sacrificing performance where necessary for compatibility. Accordingly, this approach requires Windows programs written with Cygwin to run on top of a copylefted compatibility library that must be distributed with the program, along with the program's source code. MinGW aims to provide native functionality and performance via direct Windows API calls. Unlike Cygwin, MinGW does not require a compatibility layer DLL and thus programs do not need to be distributed with source code.
Because MinGW is dependent upon Windows API calls, it cannot provide a full POSIX API; it is unable to compile some UNIX applications that can be compiled with Cygwin. Specifically, this applies to applications that require POSIX functionality like fork(), mmap() or ioctl() and those that expect to be run in a POSIX environment. Applications written using a cross-platform library that has itself been ported to MinGW, such as SDL, wxWidgets, Qt, or GTK+, will usually compile as easily in MinGW as they would in Cygwin.
The combination of MinGW and MSYS provides a small, self-contained environment that can be loaded onto removable media without leaving entries in the registry or files on the computer. Cygwin Portable provides a similar feature. By providing more functionality, Cygwin becomes more complicated to install and maintain.
It is also possible to cross-compile Windows applications with MinGW-GCC under POSIX systems. This means that developers do not need a Windows installation with MSYS to compile software that will run on Windows without Cygwin.

How to use MPI (openMPI or MPICH2) with minGW - GNU gfortran compiler

I am using the eclipse PTP IDE to develop MPI code, I want to be able to compile MPI on windows, it seems to provide c++ and c binding, but I am writing using fortran and gfortran compiler and would like to work in windows, the current problem doesn't exist on linux because there it is possible to compile the libraries locally in linux and use the .mod modules.
I wanted to compile the modules using cygwin but the GNU gfortran version on cygwin is too old, and I wasn't successful openMPI or MPICH2 on windows using miniGW
any suggestions? maybe using c++ binding in fortran 2003, I write my code in fortran 2003 so it support this feature.
Documentation on this issue is lacking.
Thank you.
According to the MPICH2 Installer's Guide MPICH2 can be built under cygwin (see section 9.3 of the same document), so the version of gfortran shouldn't be an issue. Have you followed the instructions in this document (in particular section 2)?

Compile GTK+ with Cygwin

I have created an application in linux with GTK2 as GUI. It uses some linux-specific headers (e.g. arpa/inet.h) so to run under Windows I have to compile it with Cygwin. I downloaded the latest installer and choose to install GTK2 and its dependencies. My program compiled fine. But it needs X server to be running! I has old-style, ugly graphics and it doesn't open in a different window, like all Windows' applications do, but inside X server's window. Because of this it can't be portable. I found that guide, which is exactly what I need, but I get an error when I run "make" for GTK2 (undefined reference for _IID_IFilePersist, although I have uuid installed - also tried it with gtk2.20). Can you suggest what to do to build my application with cygwin? Or what do I need to install for the "_IID_IFilePersist" error? Thanks in advance!
There's prebuilt packages for windows that doesn't rely on X. http://gtk-win.sourceforge.net/home/index.php/Downloads
If you don't want X server to be running, then you're going to have to port the linux-specific parts of your code and compile with MinGW rather than Cygwin.

Where can I find the gtk-builder-convert script?

I've built a small GUI app for work that uses some .glade files for pop-up windows. Recently, the ground beneath me was shifted - my environment was upgraded. Newer pyGTK versions require GTKBuilder and .xml files instead of Glade and .glade files and now my poor app is broken.
I need to convert the .glade file to the newer .xml file. Problem is Glade-3 is not on our system, and I can't find gtk-builder-convert on the web. I've looked at the Gnome GIT Browser, don't know where to start looking or how to search it.
Would anyone be kind enough to point me to the gtk-builder-convert python script?
gtk-builder-convert is part of GTK and it should already be installed on your system since you have GTK version 2.12 or higher. But if you really can't find it, here it is in the git browser: http://git.gnome.org/browse/gtk+/tree/gtk/gtk-builder-convert
ubuntu: install the tools by sudo apt-get install libgtk2.0-dev
but it is now deprecated
It worked on Linux for me using Gtk3+ and Glade3+ installed from conda by following steps.
Open your Gtk1+ older glade XML file designed in Glade1+ user interface in Glade3+ user interface.
Click on Save button in Glade3+ user interface.
Use this command after conda activate gtk-builder-convert infile outfile.