Includes
Pupeno
pupeno@REDACTED
Sat Apr 22 18:55:27 CEST 2006
Hello,
I am trying to install EUnit2 on my system to use it from one of my packages
and it lead to some general questions about includes/header files.
Where should header files needed for others to use my library go ?
I have Erlang on /usr/lib/erlang/ so my project, let's suppose Serlvers, go
into:
/usr/lib/erlang/serlvers-x.y.z/
where x.y.z is the version (0.1.0 now, 0.2.0 soon). Is that right ? wrong ?
nobody knows ?
Then include files would go on:
/usr/lib/erlang/serlvers-x.y.z/include/
right ?
How should then the applications using Serlvers include those files ?
-include("/usr/lib/erlang/serlvers-0.1.0/include/dns.hrl"). I don't think full
paths are right here.
-include("serlvers-0.1.0/include/dns.hrl"). and adding -l /usr/lib/erlang/ at
build time ? Then in the next patchlevel serlvers-0.1.1, whatever was using
serlvers won't work.
-include("dns.hrl"). then the build system should find out what version of
serlvers are there and which one to use to pass to -l, nasty.
And this takes me to a more problematic point: How should header files of
project A include header files of project A and project B ?
Supouse that I have /usr/lib/erlang/serlvers-x.y.z/include/common.hrl, should
dns.hrl -include("common.hrl") ? -include("include/common.hrl") ?
-include("serlvers-0.1.0/include/common.hrl")* ? or what ?
* it would requiring changing all the include paths each time I change
versions.
Any help is really appreciated, I am lost here.
Thank you.
--
Pupeno <pupeno@REDACTED> (http://pupeno.com)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060422/a051ba42/attachment.bin>
More information about the erlang-questions
mailing list