Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Including a rapidxml library Eclipse CDT
icon9.gif  Including a rapidxml library Eclipse CDT [message #1727816] Mon, 28 March 2016 02:13 Go to next message
Iorek Bjorne is currently offline Iorek BjorneFriend
Messages: 2
Registered: March 2016
Junior Member
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 449 times)
  • Attachment: 2.PNG
    (Size: 43.65KB, Downloaded 204 times)
  • Attachment: 3.PNG
    (Size: 44.91KB, Downloaded 426 times)
  • Attachment: 4.PNG
    (Size: 21.29KB, Downloaded 162 times)
  • Attachment: 5.PNG
    (Size: 23.63KB, Downloaded 436 times)
Re: Including a rapidxml library Eclipse CDT [message #1727871 is a reply to message #1727816] Mon, 28 March 2016 18:26 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 725
Registered: August 2014
Senior Member
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.


--

Tauno Voipio
Re: Including a rapidxml library Eclipse CDT [message #1727876 is a reply to message #1727871] Mon, 28 March 2016 21:17 Go to previous messageGo to next message
Iorek Bjorne is currently offline Iorek BjorneFriend
Messages: 2
Registered: March 2016
Junior Member
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 14:16 Go to previous message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 725
Registered: August 2014
Senior Member
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.


--

Tauno Voipio
Previous Topic:I want to know how to know -l name.
Next Topic:JAPANESE FONT
Goto Forum:
  


Current Time: Sun Aug 14 19:49:09 GMT 2022

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

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

Back to the top