You are here

Slow compilation of application using MRPT in Visual Studio 2010

2 posts / 0 new
Last post
sotomsa
sotomsa's picture
Slow compilation of application using MRPT in Visual Studio 2010

Hi all,

   I have been using MRPT for around 3 months. I have some classes that extend from MRPT classes encapsulated in a lib and another project with the actual application. It happens that every time a modify a line from my lib which extends MRPT the compilation takes around 3 minutes and a half. Is that normal?
I have been in the last hours trying to setup precompiled headers to speed up the compilation time but it is actually making it slower (now it takes 7 minutes). Can anyone let me know if precompiled headers is a solution that might speed up the compilation of my code or what else could I try? If precompiled headers is the solution, can please someone give me some clue about how to do it right.

In this moment I have created my StdAfx.h with some code that I have seen in the forum and set the visual studio with the proper /YC and /Yu directives.

Here is my StdAfx.h file

 
// Adding MRPT precompiled headers
#include <mrpt/base.h>
#include <mrpt/slam.h>
#include <mrpt/gui.h>
#include <mrpt/vision.h>
#include <mrpt/hwdrivers.h>
 
using namespace mrpt;
using namespace mrpt::utils;
using namespace mrpt::math;
using namespace mrpt::random;
using namespace mrpt::gui;
using namespace mrpt::slam;
using namespace mrpt::vision;
using namespace mrpt::hwdrivers;
 
 
// Adding Eigen's libraries
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <Eigen/LU>
#include <Eigen/Cholesky>
#include <Eigen/Householder>
#include <Eigen/SVD>
#include <Eigen/QR>
#include <Eigen/Eigenvalues>
#include <Eigen/Sparse>
#include <Eigen/Dense>
#include <Eigen/Eigen>
 
Thanks
jlblanco
jlblanco's picture
Hi, If precompiled headers

Hi, 

If precompiled headers are setup right, it should take a while to compile your precompiled source file (StdAfx.cpp or whatever, the one with /YC), but the other files (with /Yu) should compile in few seconds each. Make sure you have the right settings by examining the file properties in the Solution Explorer -> Right click on each source file -> Properties -> C/C++ -> Precompiled headers. 

As a side note: I'm still using Visual Studio 2008 because it's like 10x faster than VS2010 in everything!!

Log in or register to post comments
Subscribe to Comments for "Slow compilation of application using MRPT in Visual Studio 2010"