高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】header filename confliction
header filename confliction
header filename confliction
hi all.
i noticed that several header filenames provided by odt v3 are conflicting against objectarx headers.
i'm setup my visual studio environment to include both directories of objectarx and odt v3 in this order.
in some cases, i want to include header files from both objectarx and odt v3. but since some of them has quitely same filename, so i cannot include odt's one. this problem cannot be resolved by swapping their directory order (on visual studio setting).
currently, conflicting header files are:
dbbody.h
dbcurve.h
dbdate.h
dbfcf.h
dbfiler.h
dbfilter.h
dbframe.h
dbgroup.h
dbhatch.h
dbimage.h
dbindex.h
dblayout.h
dbmline.h
dbmtext.h
dbplotsettings.h
dbray.h
dbregion.h
dbspline.h
dbsymutl.h
dbxline.h
ge/gecone.h
ge/gefileio.h
ge/gefiler.h
ge/gegbl.h
ge/geline2d.h
ge/geline3d.h
ge/geplane.h
ge/geray2d.h
ge/geray3d.h
ge/gesphere.h
ge/getol.h
ge/getorus.h
gs/gs.h
rxdefs.h
rxobject.h
summinfo.h
is it possible such that all odt provided files (not only headers, but also libs... etc) never conflict objectarx's one?
or, since currently all odt headers stay directly under 'include/', so instead, move all to 'include/odt/' is possible?
if it's possible, then i can write as follows:
#include <someheader.h> // ...from objectarx.
#include <odt/someheader.h> // ...from odt v3.
please consider about this situation.
thank you.
can't you use the headers in such way:
#include <someheader.h> // ...from objectarx.
#include <odt/include/someheader.h> // ...from odt v3.
sergey slezkin
> #include <odt/include/someheader.h>
hmm...
it's just an idea, but...
such coding is not portable, isn't it?
i want my program be portable!
since we cannot expect odt installed location, it will works only his(her) environment.
for example, in someone's environment, it may be:
#include <odt30/include/someheader.h>
or others may:
#include <opendwg/include/someheader.h>
this cannot be resolved by header file search order.
although, if all headers are placed at include/odt/, then, by adding following two directories as compiler's header file search paths:
include/
include/odt/
already existing odt code should work okay, and my problem is also resolved.
how is this?
thank you.
i don't like neither renaming header files no having one more folder level like "include/odt"
what if we rename opendwg "include" folder to "odtinclude"?
so you will write in your program:
#include <someheader.h> // ...from objectarx.
#include <odtinclude/someheader.h> // ...from odt v3.
having search paths like:
d:/objectarx/include
d:/opendwg or d:/odt
sergey slezkin
thank you for suggestion.
i think that solution's seemed not so smart, and i cannot see why you don't want to do that.
but, at the same time, i know such situation (need to include both arx and odt headers) may be rare case. perhaps, only me? in the planet. so...
i will take that way.
thank you for your valuable time.
|