# <raptor2/raptor2.h> or <raptor2.h>



## bkouhi (Sep 11, 2013)

Hi.

I am working on a software. But during the compilation, I've encountered some error messages like this:


```
...
Scanning dependencies of target traversoslv2
[ 41%] Building C object src/3rdparty/slv2/CMakeFiles/traversoslv2.dir/src/plugin.o
In file included from /usr/local/include/librdf.h:406,
                 from /usr/ports/obj/root/traverso/work/traverso-0.49.2/src/3rdparty/slv2/src/plugin.c:25:
/usr/local/include/rdf_serializer.h:[B]39[/B]:21: error: raptor2.h: No such file or directory
...
```

On line 39 of rdf_serializer.h, raptor2.h was included as follows:


```
#include <raptor2.h>
```

Then, I've noticed that raptor2.h does not exist in /usr/local/include, but it is in /usr/local/include/raptor2/raptor2.h (it can be confirmed by /usr/ports/textproc/raptor2/pkg-plist). So, I've opened rdf_serializer.h in my text editor and changed that line to:


```
#include <raptor2/raptor2.h>
```

And that particular error message was resolved. The same error messages happened for rdf_utf8.h, rdf_log.h, librdf.h, ... and resolved in the same way (i.e. I've changed <raptor2.h> to <raptor2/raptor2.h>) . Those header files (i.e. rdf_utf8.h, rdf_log.h, librdf.h and...) are part of textproc/redland. And /usr/local/include/raptor2/raptor2.h is part of textproc/raptor2.

Sorry for asking this stupid question, but is this a problem? Should I fill a PR?


----------



## ShelLuser (Sep 11, 2013)

bkouhi said:
			
		

> Same error messages happened for rdf_utf8.h, rdf_log.h, librdf.h, ... and resolved in the same way. (i.e. I've changed <raptor2.h> to <raptor2/raptor2.h>)
> 
> Those files are part of textproc/redland
> 
> Sorry for asking this stupid question, but is this a problem? Should I fill a PR?


The best way to find out is to build textproc/redland and see what happens. I just did on FreeBSD 9.1-P6 using version 1.0.16 of Redland and textproc/redland builds without any problems for me.

When looking into librdf.h I see the following:


```
#ifndef LIBRDF_OBJC_FRAMEWORK
/* raptor */
#include <raptor2.h>
/* rasqal: uses raptor */
#include <rasqal.h>
/* librdf: uses rasqal and raptor */
#else
#include <Redland/raptor2.h>
#include <Redland/rasqal.h>
#endif
```
So it looks to me as if the author (or port maintainer; I simply issued `# make build` and looked at the results) knew exactly what he or she is doing. And I also can't help wonder if this example is maybe of some use for your Makefile as well.

Hope this can help.


----------



## cpm@ (Sep 11, 2013)

Hi @bkouhi,

IMHO, the maintainer had to modify the header file path raptor2.h so it can coexist with raptor.h

Per Raptor2 2.0.3 changes:


> The main change is to add the new main header file raptor2.h. The new header has been added to allow applications to be sure they have got the raptor V2 header (with #include <raptor2.h> and not the raptor V1 header file (#include <raptor.h>). The raptor.h header will NOT be removed until the next major raptor release (V3).


----------

