Re: [dev] How to use DBG_foo?
bjoern michaelsen - Sun Microsystems - Hamburg Germany wrote: On Thu, 01 Apr 2010 16:40:11 -0400 Terrence Enger ten...@iseries-guru.com wrote: Greetings, What does it take to use, for example, the DBG_ASSERT function defined in debug.hxx? I have poked around on the wiki without success. I have added enough #include lines to get the file to compile, but now the link step is failing with undefined references to DbgFunc() and DbgOut(). I see that these functions are bound into libtlli.so, but how do I tell the build system to--pardon the pun--make the link? In general -- dont do it. As Michael Stahl pointed out on: http://wiki.services.openoffice.org/wiki/Writer/Code_Conventions DBG_* is defined in module tools, and therefore evil by definition Consider using OSL_ENSURE and friends from sal/inc/osl/diagnose.h instead. If you still want you use the evil old tools asserts, you would need to find the makefile where the linking gets done (most on the time ${MODULE}/util) and add the tool lib to the linked lib like this: SHL[0-9]STDLIBS+= $(TOOLSLIB) You would also need to make sure that your module depends (directly or indirectly) on the tools module in the prj/build.lst file. For the tools DBG_foo stuff you also have to build a nonproduct version (--enable-dbgutil in configure). OSL_foo also works in product builds with DEBUG=TRUE. Regards, Mathias - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
Re: [dev] How to use DBG_foo?
On Thu, 2010-04-01 at 23:29 +0200, bjoern michaelsen - Sun Microsystems - Hamburg Germany wrote: On Thu, 01 Apr 2010 16:40:11 -0400 Terrence Enger ten...@iseries-guru.com wrote: What does it take to use, for example, the DBG_ASSERT function defined in debug.hxx? I have poked around on the wiki without success. In general -- dont do it. As Michael Stahl pointed out on: http://wiki.services.openoffice.org/wiki/Writer/Code_Conventions DBG_* is defined in module tools, and therefore evil by definition Consider using OSL_ENSURE and friends from sal/inc/osl/diagnose.h instead. Thank you. I was thinking of DBG_ASSERT simply because I saw it first as I poked around in the OOo code. Hardly a compelling basis for choice. OSL_ENSURE is giving me the visibility I needed, and I had no build problems to solve. Cheers, Terry. - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
[dev] How to use DBG_foo?
Greetings, What does it take to use, for example, the DBG_ASSERT function defined in debug.hxx? I have poked around on the wiki without success. I have added enough #include lines to get the file to compile, but now the link step is failing with undefined references to DbgFunc() and DbgOut(). I see that these functions are bound into libtlli.so, but how do I tell the build system to--pardon the pun--make the link? Cheers, Terry. - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org
Re: [dev] How to use DBG_foo?
On Thu, 01 Apr 2010 16:40:11 -0400 Terrence Enger ten...@iseries-guru.com wrote: Greetings, What does it take to use, for example, the DBG_ASSERT function defined in debug.hxx? I have poked around on the wiki without success. I have added enough #include lines to get the file to compile, but now the link step is failing with undefined references to DbgFunc() and DbgOut(). I see that these functions are bound into libtlli.so, but how do I tell the build system to--pardon the pun--make the link? In general -- dont do it. As Michael Stahl pointed out on: http://wiki.services.openoffice.org/wiki/Writer/Code_Conventions DBG_* is defined in module tools, and therefore evil by definition Consider using OSL_ENSURE and friends from sal/inc/osl/diagnose.h instead. If you still want you use the evil old tools asserts, you would need to find the makefile where the linking gets done (most on the time ${MODULE}/util) and add the tool lib to the linked lib like this: SHL[0-9]STDLIBS+= $(TOOLSLIB) You would also need to make sure that your module depends (directly or indirectly) on the tools module in the prj/build.lst file. Best Regards, Bjoern - To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org