|
From: doug s. <hig...@ho...> - 2013-05-21 12:19:06
|
> while going on with the C++ project I'm building, I've got some linker > error. > > The cause was a multiple definition of: > int EAIbufsize; > char *EAIbuffer; > > That are defined in: > d:\Sviluppo\INCA\Inca3D\I3DPlayer\freewrl\freewrl\freex3d\src\lib\iglobal.h > as members of the struct: > struct tEAICore (line 130) > and in: > d:\Sviluppo\INCA\Inca3D\I3DPlayer\freewrl\freewrl\freex3d\src\lib\input\EAIHeaders.h > (line 200) > as simple variables. > > I've tried to comment the declarations in EAIHeaders.h and rebuild all, > without errors. > I do not know if they are used in other projects (there is a reference > to Java and plugin projects), nevertheless I feel that this redefinition > is not correct, since in one case they are members of a crucial struct, > and in the other they are simple variables. > Also, given that iglobal.h is one of the main headers, it should be > better to keep them only there. > > What do you think? . Luca, I think it's OK to comment them out - go for it. -Doug more... A few years ago I moved all static variables into the global struct. But I could have missed removing a few after the move, especially if there were no compile errors. . > > Il 20/05/2013 18:09, Luca Cerutti ha scritto: >> Hi, >> I was working with the awesome X3D_get[type] and X3D_new[type] functions >> that make easy to translate values in and out the EAI channel when I've >> noticed what can be a bug. >> >> First of all, the X3D_freeNode function >> \src\libeai\EAI_C_Field.c -> line 38 >> >> works well for all the SF types, but it seems to me that does wrong the >> freeing of the MF types. In fact for almost all the MF types deallocates >> only the >> node->X3D_MFInt32.p pointer (line 73-82) , even if the struct allocates >> other types. >> >> The second problem lies in some X3D_new[type] functions that seem to >> allocate the wrong type. >> For instance >> X3D_newMFVec3f(int num, float(* array)[3]) >> \src\libeai\EAI_C_Field.c -> line 325 >> >> instead of allocating space for "n" _intX3D_SFVec3f and passing the >> address to the internal member X3D_MFVec3f.p allocates space for "n" X3DNode >> retval->X3D_MFVec3f.p = malloc (sizeof(X3DNode) * num); [line 332] >> >> I hope this could be useful. >> > > > -- > =============================================================== > Luca Cerutti > Profutura s.r.l. - Corso Tortona 17 - 10153 Torino > phone: +39 (0)11 8392363 - fax: +39 (0)11 837802 > e-mail: ce...@sy... > http://www.synarea.com > > Le informazioni, i dati e le notizie contenute nella presente comunicazione e i relativi allegati sono di natura privata e come tali possono essere riservate e sono, comunque, destinate esclusivamente ai destinatari indicati in epigrafe. La diffusione, distribuzione e/o la copiatura del documento trasmesso da parte di qualsiasi soggetto diverso dal destinatario è proibita, sia ai sensi dell’art. 616 c.p., sia ai sensi del D.Lgs. n. 196/2003. Se avete ricevuto questo messaggio per errore, vi preghiamo di distruggerlo e di darcene immediata comunicazione anche inviando un messaggio di ritorno all’indirizzo e-mail del mittente. > > This e-mail (including attachments) is intended only for the recipient(s) named above. It may contain confidential or privileged information and should not be read, copied or otherwise used by any other person. If you are not the named recipient, please contact (ce...@sy...) and delete the e-mail from your system. Rif. D.L. 196/2003. > =============================================================== > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may > _______________________________________________ > FreeWRL-develop mailing list > Fre...@li... > https://lists.sourceforge.net/lists/listinfo/freewrl-develop |