Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tips/Resources for Large Scale Cross-Platform Software Projects

Tags:

c++

cuda

qt4

I'm going to be starting a large scale software project involving a cross-platform GUI and heavy number crunching. I plan on writing most of the application back-end in C++ and CUDA, and the GUI in Qt4. I plan on using Make as my build system. This will be a project that will only have two developers, and will probably end up being an open source project once I get relatively far with it.

My main question is, does anyone have any tips/resources for developing the architecture behind the software.

  • What would be a good way to structure your files? (number crunching code in a separate folder than the gui code, which is separate from the compiled executables, or something else?)
  • How would the build system work for cross-platform software? Would I need to set-up a different build system for each platform, or could I create a common "makefile" that would build differently depending on which platform invoked it?
  • What kinds of modifications would I need to do to my code to ensure it will build properly on all platforms (pre-processor directives, etc...)?
  • How does someone handle revision control for large projects and integrate it into the build system so I get Version.Revision.Build numbers that update with each time I build my project?

I've been disheartened by the fact that my college that I'm about to graduate from covers almost none of this. At this point, I've done a lot of Google searches with little luck on what I need. I'm not asking to be spoon fed everything, I'd be perfectly content with links to books or websites relating to this.

I've done most of this stuff separately, but I've never tried to combine everything into one big package.

Would anyone recommend Release It!: Design and Deploy Production-Ready Software for what I'm inquiring about?

like image 204
Jason Iverson Avatar asked Nov 14 '10 23:11

Jason Iverson


People also ask

What makes a software project complex?

Intrinsic project complexity comes from the project itself, and how difficult it is to solve your problem. Intrinsic complexity is inherent to the problem you're trying to address with software. That means all software development has intrinsic project complexity, simply because it exists, if you will.

How software projects are different from other projects?

Software projects contain more complexity than other engineered artifacts. For example, in a bridge, there is a clear structural relationship between parts, whereas software component relationships are much more complicated. We can't measure the complexity of a software project until we work on it.


1 Answers

1) The structure can be the same, but if you're including files in subdirectories, make sure you use '/ and not \. The former will also work on windows.

2) I'd check out cmake ( http://www.cmake.org/ ) for managing building across multiple platforms. This will take a lot of pain out of the process for you.

3) Use STL and Boost as much as you can. These libraries have been designed with this very problem in mind. This will cover a huge portion of what you might need to do. You've already chosen the excellent Qt library, so your GUI is not an issue either. With these 3 combined, you're already most of the way there. That said, you might have to do something that is platform independent and not covered by any of these. For this I suggest you write a class that exposes a consistent interface across all platforms, and hide the nitty-gritty with preprocessor directives in the source file. It is imperative to expose a consistent interface.

4) Use SVN. I don't know how to do it on other compilers, but it is trivial in Visual Studio to get the latest revision and insert it in to some file that then gets included in your project. You can use build events to do this. Sorry I can't elaborate on other platforms.

In addition, if you have to head outside of STL, Boost, Qt etceteras, be mindful of the documentation of the API calls on all platforms. I have been bitten in the past by the behavior of a fseek() API call that wrote bytes to pad out to the destination on one implementation, but not the other. These can be a major cause of headache and another reason to try and stick to tried-and-tested libraries as mentioned above.

like image 109
Moo-Juice Avatar answered Nov 06 '22 11:11

Moo-Juice