|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Including libraries with KDevelop
Im having some problems including libraries properly with the IDE Kdevelop, namely the libxml2 library. I tried to include by going (roughly) to Project >> Options >>
where i could add includes/libraries. I did both in a number of different ways, i.e. I added the libxml directory, which is part of libxml 2 only. then i tried to add libxml2. both as an include and as a library. In my own files, I expected #include </libml/HTMLParser> to work, but it never did. when I changed it to : #include </libxml2/libxml/HTMLParser> the compiler found the files perfectly. I dont mind this change to my code, but files within libxml2, also use #includes, and the expect to only use: #include </libxml/parser>. Im sure the fact that /libxml2/libxml works, but /libxml does shows where the problem lies - but I dont see it. |
|
#2
|
|||
|
|||
|
you have to include both. but in different ways.
- you need to point the include dir to folder with the ".h" file - you need to point the linker to the .lib (.a, .so) file - you also need to link against all libraries that libxml depends on include with brackets (<>) afaik is used for system libraries, i am not even sure if "#include </lib....>" is valid (as /lib... is an absolute path). it should read: #include "libxml/libxml.h"; or only: #include "libxml.h"; depending on the include path setting.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
||||
|
||||
|
Fasecious point, but you don't need semi colon's after the #include
![]()
__________________
Online Designer Baby Clothes Store FiftyFifty Web Page, advertising space, with 50% profit share Free web development scripts! Tattoo Blog Free graphical wedding tickers |
|
#4
|
|||
|
|||
|
php habits
![]() |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Including libraries with KDevelop |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|