2

I am using Visual Studio Ultimate 2012. I have a project that works when i use the default v110 platform toolset.

Now I would like to add the Point Cloud Library (PCL) to this project to further work on it. Unfortunately there are only binaries available for Visual Studio 2010. I first tried to compile the 2012 binaries myself but that turned out to be more trouble than its worth. So i changed my platform toolset to v100 in order to use the PCL prebuilt binaries.

However, when doing so, one of my includes (atlbase.h) is no longer recognized. I have tried to manually include this by adding the Include and Library Directories of ATL in the project properties. This generated a whole lot of new errors, originating from the atl header files, which seems odd. I have also tried changing the option "Use of ATL" to "Dynamic Link to ATL" and "Static Link to ATL" from the default "Not Using ATL" to no avail.

I'm working on a 64 bit Windows 7 Ultimate machine and want to compile in 32 bit.

Edit: Using Process Monitor I have found that Visual Studio is looking for the include file in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\atlmfc\include\atlbase.h. This folder (..\atlmfc) does not exist. My VS2012 is installed at D:\School Programs\Visual Studio 2012

Is there a fix for this?

  • Do you have VS 2010 installed? – Michael Burr Mar 31 '14 at 03:58
  • I have a version of VS 2010 Express installed yes. – Laurens Vergote Mar 31 '14 at 04:25
  • 1
    2010 Express comes with build tools, but [without ATL source code to include/reference](http://stackoverflow.com/questions/2681050/atlbase-h-not-found-when-using-visual-c-express-2010/7885201#7885201). – Roman R. Mar 31 '14 at 05:56
  • I'm not sure how well this works, but you might be able to get ATL working with VS 2010 Express using the WDK 7.1: http://www.microsoft.com/en-us/download/confirmation.aspx?id=11800 – Michael Burr Mar 31 '14 at 07:57
  • @RomanR.: I am aware of this, but I'm not using 2010 Express IDE to open or compile the project, I'm using 2012 Ultimate with 2010 platform toolset and 2012 Ultimate does come with ATL. I thought the lack of ATL in express wouldnt matter because i don't use it. – Laurens Vergote Mar 31 '14 at 13:57
  • @Signapez: apparently you are using ATL, at least in some small and perhaps indirect way. If you aren't intentionally using ATL, maybe you can work out how to remove the dependency; start by commenting out the `#include ` – Michael Burr Mar 31 '14 at 14:59
  • @MichaelBurr: Installing the WDK7.1 you linked and manually including this in project properties got rid of the errors. I'm now testing if my application still works as intended and adding PCL afterwards. I'll add the answer to my question with your link if everything works out. – Laurens Vergote Mar 31 '14 at 15:25
  • An important note here would be that WDK has a subset of ATL classes. That is, this solution is going to work out if the project is using some bits of ATL (e.g. smart pointer template classes wrapping COM interface pointers), and otherwise one would still non-Express version of VS. – Roman R. Apr 01 '14 at 19:09

2 Answers2

2
  1. When you Switch to another different toolset this complete toolset must be available. This includes also the header files.
  2. It should be possible without great Trouble to convert this DLL into VS 2012. Or myabe you can include the complete source without using a separate DLL.
xMRi
  • 14,982
  • 3
  • 26
  • 59
2
  1. Download and install WDK 7.1 (microsoft.com/en-us/download/confirmation.aspx?id=11800)
  2. Create an environment variable which points to the installation directory, I called mine WINDDK
  3. Go to project Properties -> VC++ Directories
  4. Add $(WINDDK)\inc\atl71 to Include Directories
  5. Add $(WINDDK)\lib\ATL\i386 to Library Directories (this is for 32 bit)
  6. Go to project Properties -> Linker -> Input
  7. Add atl.lib to Additional Dependencies

These steps have solved my problem