2

I'm going to get a book that uses Xerces C++. I'm currently using VS 2010 ultimate, so the program doesn't miss any features. I've downloaded the precompiled binaries for windows x86 VC10. My question is what do I have to do to my environmental variables and files to be able to have Visual studio import the header files i.e. #include . I have no experience linking external libraries, so I need a simple explanation.

sj755
  • 3,944
  • 14
  • 59
  • 79
  • Why don't you get a book that uses Visual C++? – In silico Nov 28 '10 at 02:17
  • I do have 1 book on Visual C++, but it only uses the standard library. Ivor Horton's Beginning Visual C++ 2010. – sj755 Nov 28 '10 at 02:38
  • You have to set up Visual Studio's C++ project settings to configure the Include path for Xerces' headers, and the Lib path for its lib files. I am assuming you mean [Xerces XML Parser](http://xerces.apache.org/xerces-c/) – wkl Nov 28 '10 at 03:18
  • @birryree yes, I am referring to the XML parser, could you elaborate as to how I configure the include path and lib path? – sj755 Nov 28 '10 at 06:08
  • @seljuq70 - I've answered this type of question before so I won't keep making repeat answers, so check out: http://stackoverflow.com/questions/4290249/mysql-mysql-h-file-not-found-in-vs2008-c-beginner-question/4290261#4290261 – wkl Nov 28 '10 at 06:22
  • @birryree Was that VS08, because that menu doesn't appear at all in VS10. In the VS I'm using all I see is "VC++ Directories editing has been deprecated." and "VC++ Directories are now available as auser property sheet that is added by default to all projects." – sj755 Nov 28 '10 at 07:44

1 Answers1

9

Right click on your project -> Properties -> C/C++ -> General -> Additional Include Directories

Include the path of Xerces include files.

For Lib Properties Linker -> General -> Additional Library Directories

Include the path of Xerces lib files.

In Linker -> General -> Input -> Additional dependencies

Add the libs required for linking.

DumbCoder
  • 5,696
  • 3
  • 29
  • 40
  • I've managed to add the .lib files, link the library directory, and added the path to the include files. My program compiles, but the program fails and says the dll files are missing. The files are in the bin folder of the xerces file I downloaded, what do I do about those? – sj755 Nov 28 '10 at 08:13
  • @seljuq70 - For dll files put them in the folder, from where the exe is running. – DumbCoder Nov 28 '10 at 09:59
  • 1
    thanks, that worked completely. However, isn't there a way to grant all my programs access to the DLL files, without having to copy and paste them to my programs debug folder every time? – sj755 Nov 28 '10 at 18:40