Need Help Compiling GUI C Program using Visual C++ Please

I need help compiling open source G Predict Satellite Tracking C program using Visual C++ 2022 Community edition please.

On Google, searched for Github Gpredict Satellite Tracking and went to following URL

https://github.com/csete/gpredict

On this webpage there are src folder, win32 folder with

I will add more details to this post soon please.




Last edited on
Did you follow the instructions in win32/README ???

At present, MSYS2 on a Windows system is required to gather dependencies
before building a Win32 version of gpredict using this build system.

I don't see project/solution files for Visual Studio in this repository, only a Makefile to be used in a Unix-like build environment.

So, forget about Visual C++ for this project and use MSYS2/Mingw-w64 to build it:

https://www.msys2.org/

https://www.freecodecamp.org/news/how-to-install-c-and-cpp-compiler-on-windows/


(Note: For a somewhat complex software project, trying to build with a build system that is not "officially" supported by the upstream developers will be a huge task, if possible at all. So, you better stick with what the developers recommended!)
Last edited on
One thing to note about MSYS2, it requires 64-bit Windows. As explained on the MSYS2 home page.

It is a damn fine command-line setup, giving the look and feel of a Unix shell interface.

That Gpredict app looks like it is only buildable as a 32-bit app. Shame.
VS has command-line tools available as well as the ability to use CMake files. So using the VS compiler to build this project outside the IDE is theoretically possible, though it probably would require some hand-holding to get the compile process to work.

https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170
Have you considered running Linux? If you can get your hands on a 2nd computer, try it.

A distribution like Mint or Kununtu will not be completely unfamiliar to a Windows user. If you can move from Windows to a Mac, you'll find using Linux trivial.
Last edited on
I don’t think telling OP to change his OS is very helpful when OP wants to compile on Windows. It’s one thing to cross-compile from an extant system (not easy), but it is a whole new level of grief to set up yet another OS just to target your current OS...

That said, the documentation right at the start says very clearly it is a Linux Desktop application, and in order to compile on Windows you will need MSYS2.

MSYS2 is indeed very easy to set up. The trick is properly installing and configuring the required libraries, such as GTK+, which is not so easy, even with the pacman tool (MSYS2 is an Arch linux distro).

Why not just use the precompiled version referenced in the docs?
https://github.com/csete/gpredict/issues/110
http://files.oz9aec.net/gpredict/temp/gpredict-win32-2.1.156.zip

If all you want is to use the software then that is all you should need.
Hello kigar64551, George P, kbw and Duthomhas,
Many, many thanks for your excellent inputs and URL links.

I have a Ubuntu laptop that I used some time back. I will see what state that laptop is? And I like to compile on the Ubuntu laptop.

Please help me by providing one or two best URL links that have detailed Gpredict compile/build steps on Ubuntu.

After I am successful in compiling on Ubuntu, I will build using msys2.



The documentation has all the required steps. Like I said, the most difficult part is making sure you install all the dependencies. Often you can get the required command for your distribution by googling something like “ubuntu install gtk+ dev” or “msys2 install gtk+ dev”.

For the latter, Google listed a link for the GTK documentation:
https://www.gtk.org › docs › installations › windows 
Setting up GTK for Windows
which naturally took me to this page: https://www.gtk.org/docs/installations/windows

Reading down it provides the pacman commands not only to install GTK, but also how to do other useful stuff, like make sure your compiler is installed and how to compile and bundle your GTK application.
Last edited on
Thank you so much, Duthomhas,
for the detailed steps about installing gtk+ etc

I will work on these steps etc & post here my progress.

Thanks and best regards,
Topic archived. No new replies allowed.