Question

I'm using XCode 3.2.1 on OSX 10.6.8, and I want to study how Avogadro works by debugging its source code. There is a CMake guide here:

http://avogadro.openmolecules.net/wiki/Compiling_on_Linux_and_Mac_OS_X

that explains how to do it (and the sources are provided), but I am a novice programmer and am not very familiar with debugging. Can somebody explain to me how to organize the source files into a new XCode project and step through a compiled version?

Here is the git clone command:

git clone --recursive git://github.com/cryos/avogadro-squared.git

I spot a folder called /Users/Eric/Desktop/avogadro-squared/avogadro/avogadro/src but I'm unsure as to how to proceed with setting flags etc., since the project is originally compiled in Cmake.

Thanks so much! I really appreciate it.

Was it helpful?

Solution

I'm not familiar with Avogadro but I just downloaded the source. There are not any xcode projects that I could find. So if you want to use Xcode to debug it you will need to create the necessary projects. How do you do that? Well, Avogadro seems to be built up with several other sub modules, openqube, openbabel, and eigen in particular. So you will need to create xcode projects for them also (if they don't have them already.)

This is not a small job, you'll need to read the makefiles and see what libraries they need etc...

But, and this is the good news, once it is done you will have learn a lot about how Avogadro is built which will help you learn how Avogadro works, which was your goal.

And when you are done, you can then offer up your changes to the community, after all, that is what open source is all about, right?

OTHER TIPS

Avogadro uses CMake, and CMake is a build system generator (part of the reason we chose it). So you can use its generator mechanism to request an XCode build system. There is a general answer on Stackoverlow to generate an XCode project using CMake. You are looking at the superbuild which gathers/builds all dependencies - you really want to go into the avogadro subfolder and open that in XCode.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top