?

Log in

No account? Create an account

Dear Lazyweb, C++ library names and include files

« previous entry | next entry »
Oct. 31st, 2007 | 05:12 pm

Hi!

I don't write new C++ libraries all that often that I intend to publish. I have a class I need to define... so I am thinking...

/usr/include/Class.h

but...

I already have a
/usr/include/class.h

OSX, Windows.... both have case insensitive file systems. So the above is not going to work.

What is the common naming convention to use?

For the library I was going to do:
libclass++.so

so that it does not clash with:

libclass.so

Any thoughts? Surely one of you out there has strong feelings on this sort of thing.

Thanks!
-Brian

Link | Leave a comment | Share

Comments {3}

Dossy

(no subject)

from: dossy
date: Nov. 1st, 2007 02:15 am (UTC)
Link

/usr/include/class.hpp for the C++ version.

Reply | Thread

Brian "Krow" Aker

(no subject)

from: krow
date: Nov. 1st, 2007 03:37 am (UTC)
Link

I've never seen hpp used all that often. I was under the impression that it was just used by Visual Studio (or some other Windows compiler). Looking in /usr/include on Fedora I see a few files using the extension.

Reply | Parent | Thread

Lover of Ideas

(no subject)

from: omnifarious
date: Nov. 1st, 2007 08:30 am (UTC)
Link

Another evil thing you could do is use a #ifdef __cplusplus__ and have the same header file for both. But I really do think that'd be evil. :-) Go with .hpp. It's what Boost uses.

Reply | Parent | Thread