Tips / Resources for Large-Scale Cross-Platform Software Projects

I am going to start a large-scale software project using a cross-platform GUI and heavy crunching. I plan to write most of the application environment in C ++ and CUDA, as well as the graphical interface in Qt4. I plan to use Make as my build system. It will be a project in which there will be only two developers, and probably in the end it will become an open source project when I get relatively far.

My main question is: does anyone have any tips / resources for developing a software architecture.

  • What would be a good way to structure your files? (the number of crunching code in a separate folder than the gui code that is separate from compiled executables or something else?)
  • How will the build system work for cross-platform software? Do I need to configure a different build system for each platform, or can I create a common "makefile" that will build in different ways depending on which platform is called?
  • What modifications will I need to make for my code to ensure its proper assembly on all platforms (preprocessor directives, etc.)?
  • How does someone handle version control for large projects and integrate it into the build system, so I get Version.Revision.Build numbers that are updated every time I create my project?

I was saddened by the fact that my college, which I was going to graduate from, did almost nothing. At the moment, I have done a lot of Google searches with little luck on what I need. I do not ask that everything be a spoon, I would be completely pleased with the links to books or websites related to this.

I did most of this material separately, but I never tried to combine everything into one big package.

Someone recommend Let it go !: Design and deploy ready-made software , what am I asking?

+6
c ++ qt4 cuda
source share
2 answers

1) The structure may be the same, but if you include files in subdirectories, make sure that you use '/ and not \ . The first will work with windows.

2) I checked cmake ( http://www.cmake.org/ ) to manage the building on several platforms. This will require a lot of pain from you.

3) Use STL and Boost as much as you can. These libraries were designed with this very problem in mind. This will cover a huge part of what you may need. You have already chosen the excellent Qt library, so your GUI is not a problem either. With these three combined, you are already most there. However, you may have to do something platform independent and not covered by any of them. To do this, I suggest you write a class that provides a consistent interface for all platforms, and hide nitty-gritty with preprocessor directives in the source file. It is imperative to set a consistent interface.

4) Use SVN. I don’t know how to do this on other compilers, but in Visual Studio it’s trivial to get the latest version and paste it into some file, which is then included in your project. You can use build events for this. Sorry, I can’t elaborate on other platforms.

Also, if you need to go beyond STL, Boost, Qt, etc., remember the documentation of API calls on all platforms. I was bitten in the past by the behavior of the fseek() API call, which wrote bytes for upload to a destination in one implementation, but not in another. This could be the main cause of the headache and another reason to try and stick to the tried and tested libraries, as mentioned above.

+2
source share

Qt will match your reqs, IMO .. I will reply with a Qt answer.

As for the file structure, you can have the *.cpp and *.h source files in the folder, the rest of the libraries and dependencies in another folder. You can create *.ui files using the Qt constructor, or you can directly encode them. (In which later compilation time will be significantly increased). Generated files (for example, *.exe , *.obj , etc.) can be placed in a separate folder so that your file system looks consistent. Qt has easy ways to do the above. Check out QMake here.

As for portability, you can easily port Qt applications to various platforms. Check here ..

As for version control, I'm used to SVN and everything is fine with it. Just choose the one that suits your needs.

Since you are about to graduate, Qt has certain advantages over others.

  • From the links I provided to you, you could understand that the documentation for Qt is extensive and you can work on it without much professional support.
  • And most importantly, Qt is in LGPL , and you can play for free ... :)

NTN ..

0
source share

All Articles