高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】compile against dwgdirect 9solaris0 equest for member `oper
compile against dwgdirect (solaris): equest for member `oper
compile against dwgdirect (solaris): equest for member `operator delete' is ambiguous
hi,
when trying to build my application using dwgdirect for solaris, i get the following errors when compiling;
myfile.cpp: in method `myservices::~myservices()':
myfile.cpp:313: request for member `operator delete' is ambiguous
../sdks/odg/dwgdirect/include/rxobject.h:451: candidates are: static void odrxobject:: operator delete(void *, void *)
../sdks/odg/dwgdirect/include/rxobject.h:451: candidates are: static void odrxobject:: operator delete(void *)
../sdks/odg/dwgdirect/include/rxobject.h:451: static void odrxobject:: operator delete(void *, void *)
../sdks/odg/dwgdirect/include/rxobject.h:451: static void odrxobject:: operator delete(void *)
myfile.cpp: in method `odstaticrxobject<myservices>::~odstaticrxobject() ':
myfile.cpp:313: request for member `operator delete' is ambiguous
../sdks/odg/dwgdirect/include/rxobject.h:451: candidates are: static void odrxobject:: operator delete(void *, void *)
../sdks/odg/dwgdirect/include/rxobject.h:451: candidates are: static void odrxobject:: operator delete(void *)
../sdks/odg/dwgdirect/include/rxobject.h:451: static void odrxobject:: operator delete(void *, void *)
../sdks/odg/dwgdirect/include/rxobject.h:451: static void odrxobject:: operator delete(void *)
make: *** [debugtarget] error 1
myfile.cpp (line 313) is just a declaration like;
odstaticrxobject<myservices> svcs; // create a custom services object.
odrxobject.h (line 451) is;
odrx_heap_operators();
any ideas how to correct this??
--------------------------------------------------------------------------------
ryan lohan
integration developer
objective corporation limited
--------------------------------------------------------------------------------
also,
i'm using g++ to build against the solars gcc libraries. i can now see that this same problem occurs against the unix example odreadex - the build fails with this same message... any help??
--------------------------------------------------------------------------------
ryan lohan
integration developer
objective corporation limited
--------------------------------------------------------------------------------
what version of dwgdirect are you using? do you have:
protected:
odrx_using_heap_operators(exsystemservices);
in your services class (as in our odreadex sample)?
this is building against the latest solaris version of dwgdirect (1.14.02 build). we have a basic wrapper class 'myservices' which extends both exsystemservies and exhostappservices, and yes that macro is declared in the myservices class.
i have worked around the problem for now by changing my code to not use the myservices class so there is no multiple inheritance (i use an instance of exhostappservices and exsystemservices separately), however i'm not sure what impact this may have.
also, as i mentioned - the unix odreadex example fails to build against these solaris libs, so the problem isn't isolated to my code.
--------------------------------------------------------------------------------
ryan lohan
integration developer
objective corporation limited
--------------------------------------------------------------------------------
last edited by rjlohan; 1st june 2006 at 10:53 pmfff">.
we build all of our samples prior to each release, so there must be some other difference. what version of the solaris compiler are you using? could you send your makefile to so we could check for differences in compiler settings, etc.?
i've tried building with gcc 3.4.2 and sun c 5.6. i've tried linking with gld and g++. my makefile is virtually identical to the example provided - the only compiler or linker options i have that are different are related to the -w/-w flags to alter warning notification during build. (and of course, my source is different).
as i said though, i can't build the examples using your makefiles, so if you say that you've successfully built them, then the problem is likely in the differences of versions of compilers/linkers or dependant libraries used in our builds.
is there information somewhere about which compiler/linker versions the dwgdirect libraries were built against?
--------------------------------------------------------------------------------
ryan lohan
integration developer
objective corporation limited
--------------------------------------------------------------------------------
|