Jim

Probably the following pattern should be useful to avoid the name space 
collisions further (header files etc.). Should still rename the library 
(but that should be a few Makefile(s) ).

from 
http://www.openismus.com/documents/linux/building_libraries/building_libraries

"

When the library is installed, its header files should be installed into 
their own subdirectory of the common include directory. This practise 
avoids namespace pollution, and avoids the need to prefix the filenames 
themselves in order to avoid conflicts with other libraries' header files.

For this to work, the subdirectory which contains the header files must 
not be in the include search path of the compiler. Instead, code that 
uses the library should include the headers like so:

#include<something/something.h>
#include<something/extrabits.h>

"
Regards
Santhosh


On Wednesday 15,June,2011 06:08 AM, Frank Gönninger wrote:
> Jim,
>
> To my knowledge (and 30 years programming experience ;-) there's "always" 
> some name prefix in the library name, hence my request to insert the prefix 
> "ocpi" into the lib's name.
>
> libutil ->  libocpiutil (which I like/would recommend), or
> libocpi_util (which I don't like, but for pure aesthetical reasons or even 
> personal taste). These are the two variants I have come across frequently.
>
> That really should make all OpenCPI lib names unique.
>
> I know, quite a change in the build process, the docs, ...
> Thanks for considering this.
>
> Frank
>
> Am 14.06.2011 um 23:46 schrieb James Kulp:
>
>> Is there a general solution to thus problem?  I.e. How do different packaged 
>> scope their libraries?
>>
>> Sent from my phone.
>>
>> On Jun 14, 2011, at 19:40, Frank Gönninger<[email protected]>  
>> wrote:
>>
>>> Dear OpenCPI developers:
>>>
>>> I do have severe problems due to the fact that there is a libutil in the 
>>> library search path on OS X (in /usr/lib). That path is in 
>>> DYLD_LIBRARY_PATH before OpenCPI's lib dir in my environment. Effect: 
>>> OpenCPI attempts laods the wrong libutil (resulting in abort trap). If I 
>>> change the library search path as to OpenCPI's libutil being found first 
>>> some of the system tools (for example the Erlang environment) don't work 
>>> anynore  - those tools now find OpenCPI's libutil which obviously is the 
>>> wrong one ...
>>>
>>> May rename it to libocpiutil ?
>>>
>>> Thanks for feedback!
>>>
>>> Best wishes
>>>
>>> Frank
>>>
>>> --
>>> C o n s e q u o r   C o n s u l t i n g   A G
>>> Frank Goenninger
>>>
>>> E-Mail: [email protected]
>>> Phone: +49 711 781 181-10
>>> Fax:   +49 711 781 181-11
>>>
>>> Consequor Consulting AG
>>> Liebknechtstr. 33
>>> D-70565 Stuttgart
>>>
>>> Vorstand: Frank Gönninger (Vors.), Martin Melcher
>>> Aufsichtsratsvorsitzender: Dipl.-Kfm. Matthias Filbinger
>>> Sitz der Gesellschaft: 70565 Stuttgart, Deutschland
>>> Registergericht Amtsgericht Stuttgart HRB 727446
>>>
>>>
>>> _______________________________________________
>>> opencpi_dev mailing list
>>> [email protected]
>>> http://lists.opencpi.org/listinfo.cgi/opencpi_dev-opencpi.org
> _______________________________________________
> opencpi_dev mailing list
> [email protected]
> http://lists.opencpi.org/listinfo.cgi/opencpi_dev-opencpi.org
>

“1991-2011 - Creating Growth, Enhancing Lives. Commemorating A*STAR’s 20 Years 
of Science, Technology and Research in Singapore.”

Institute for Infocomm Research disclaimer:  "This email is confidential and 
may be privileged. If you are not the intended recipient, please delete it and 
notify us immediately. Please do not copy or use it for any purpose, or 
disclose its contents to any other person. Thank you."
_______________________________________________
opencpi_dev mailing list
[email protected]
http://lists.opencpi.org/listinfo.cgi/opencpi_dev-opencpi.org

Reply via email to