Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Including a rapidxml library Eclipse CDT
icon9.gif  Including a rapidxml library Eclipse CDT [message #1727816] Sun, 27 March 2016 22:13 Go to next message
Eclipse UserFriend
I've spent hours today trying to fix this. It was working yesterday.

I'm trying to include rapidxml for OS is Win10, Eclipse Mars 2 4.5.2. The particular file I'm trying to include is
#include "rapidxml.hpp"

although the rapid rapidxml folder also contains rapidxml_utils.hpp, rapidxml_print.hpp and rapidxml_iterators.hpp.

The error appearing for all files is[code]javascript: url_insert();
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.4/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lrapidxml


I've set up as follows
>> Right click >> Properties >> C/C++ Build >>Settings >> MinGW C++ Linker >> Libraries
Search path (-L) >> C:/MinGW/rapidXML
Libraries (-l) >> rapidxml, rapidxml_utils, rapidxml_print and rapidxml_iterators each as seperate lines

>> Right click >> Properties >> C/C++ Build >>Settings >> GCC C++ Compiler
Include paths (-l) >> C:/MinGW/rapidXML

>> Right click >> Properties >> C/C++ General >> Paths and Symbols >> Library Paths
Add >> C:/MinGW/rapidXML >> Apply to all configs ticked

Anyone able to shoot some ideas this way? Links to caps are attached (only difference is I've changed the \ to a /. No difference)

Anyone able to help?
  • Attachment: 1.PNG
    (Size: 15.94KB, Downloaded 481 times)
  • Attachment: 2.PNG
    (Size: 43.65KB, Downloaded 237 times)
  • Attachment: 3.PNG
    (Size: 44.91KB, Downloaded 460 times)
  • Attachment: 4.PNG
    (Size: 21.29KB, Downloaded 197 times)
  • Attachment: 5.PNG
    (Size: 23.63KB, Downloaded 475 times)
Re: Including a rapidxml library Eclipse CDT [message #1727871 is a reply to message #1727816] Mon, 28 March 2016 14:26 Go to previous messageGo to next message
Eclipse UserFriend
It seems that your linker does not find the library files.

Including a library needs two steps:
- include the header for compilation (.h .hpp)
- include the library file for linking (.a .so .dll)

You seem to have succeeded step 1 and failed step 2. Find the library files and point the linker search there.
Re: Including a rapidxml library Eclipse CDT [message #1727876 is a reply to message #1727871] Mon, 28 March 2016 17:17 Go to previous messageGo to next message
Eclipse UserFriend
I'm going to hold my hands up and admit utter stupidity here.

Rapidxml consists of .hpp files only and thus can be included as just .hpp in the project folder. There is no need to actually add a path or library to the compiler.
Re: Including a rapidxml library Eclipse CDT [message #1727930 is a reply to message #1727876] Tue, 29 March 2016 10:16 Go to previous message
Eclipse UserFriend
You're not the one who is stupid here - the whole code is in the header files. This is contrary to the common practice.

Just delete the library search path, and you should be done.
Previous Topic:I want to know how to know -l name.
Next Topic:JAPANESE FONT
Goto Forum:
  


Current Time: Mon Jul 28 15:45:57 EDT 2025

Powered by FUDForum. Page generated in 0.03722 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top