Reputation: 255
I have never added a library to Dev-C++. I read the guide here.
So I added two lines of code to my cpp file:
#include "pugixml.hpp"
#include "pugiconfig.hpp"
But I get errors like this:
[Linker error] C:\Users\MATRIX~1\AppData\Local\Temp\ccYfRAuS.o:2.visualizza tutto.cpp:(.text+0xbc): undefined reference to `pugi::xml_document::xml_document()'
Can someone tell me how to do this in Dev-C++? I need to create a simple program that reads the XML that I created.
Upvotes: 0
Views: 1961
Reputation: 21
Add the existing files' path to the include directory, then add the existing files to your project.
Then you will be able to reference them in #include
and also in written code.
Upvotes: 0
Reputation: 161
You don't need .lib file, you need to add pugixml.cpp
to compilation.
In Dev-C++ menu choose "Project" - > "Add To Project..." and choose pugixml.cpp
.
Upvotes: 0
Reputation: 5866
You need to add the pugixml
libraries. In Dev-C++ go to your project's linker settings and find the pugixml .lib
files and add them.
Upvotes: 0