On Mon, Jun 20, 2011 at 8:46 PM, Uwe Bonnes <[email protected]> wrote: >>>>>> "Xiaofan" == Xiaofan Chen <[email protected]> writes: > Xiaofan> Even then, the question may come back to what is the intention > Xiaofan> of libftdi-1.0? > > Xiaofan> Is the intention to replace libftdi-0.1x, then it is probably a > Xiaofan> better idea to put it in the same location. Right now only one > Xiaofan> can exist in the same place (/usr or /usr/local) anyway -- they > Xiaofan> can not coexist under /usr. I suspect this is the original > Xiaofan> intention and then it is better to be compatible with > Xiaofan> libftdi-0.1x and put the header in the same place. > > Xiaofan> Is the intention not to replace libftdi-0.1x but create a new > Xiaofan> library, in that case, it is better to rename the header file > Xiaofan> so that it can easily coexist with the old library. > > The intention is to have > /usr/(local/)/include/ftdi.h for 0.1 > /usr/(local/)/include/libftdi-1.0/ftdi.h for 1.0 > /usr/(local/)/include/libftdi-x.x/ftdi.h for x.x for later versions > > and have > #include <ftdi.h> > #include<libftdi-1.0/ftdi.h> > #include<libftdi-x.x/ftdi.h> > > For the two latter cases, > #include<libftdi-1.0/libftdi.h> > #include<libftdi-x.x/libftdi.h> > > would also be fine, but i.m.h.o. bring no advantage.
If 1.0 and 0.1 can not co-exist, I see no benefits of the above. If this is to differentiate library version, then it is actually much easier to have a new API called libftdi_getversion() which return the version at runtime. -- Xiaofan -- libftdi - see http://www.intra2net.com/en/developer/libftdi for details. To unsubscribe send a mail to [email protected]
