[h323plus] Incorrect include directive in h323caps.h
Jan Willamowius
jan at willamowius.de
Tue Aug 10 18:38:16 EDT 2010
I've put this workaround into the CVS.
It was missing in h323caps.h.
Regards,
Jan
Simon Horne wrote:
> Jan
>
> The include file issue only effects windows with the latest Windows SDK.
> Unfortunately you can't just change the include path order. There is a
> compiler directive in the current CVS to distinguish the two include
> statements.
>
> #ifdef _MSC_VER
> #include "../include/codecs.h"
> #else
> #include "codecs.h"
> #endif
>
> This seems to work ok.
>
> Simon
>
> -----Original Message-----
> From: h323plus-bounces at lists.packetizer.com
> [mailto:h323plus-bounces at lists.packetizer.com] On Behalf Of Jan Willamowius
> Sent: Wednesday, August 11, 2010 5:36 AM
> To: h323plus at lists.packetizer.com
> Subject: Re: [h323plus] Incorrect include directive in h323caps.h
>
> I agree we should fix this, but renaming the include file is not an option.
> That could break lots of other applications.
>
> Going back to the plain #include "codecs.h" and fixing the order of Windows
> include paths seems like a better solution.
>
> What do you think, Simon ?
>
> Regards,
> Jan
>
>
> Francisco Olarte (M) wrote:
> > Trying to compile an app (yate3) with h323plus 2010-05-25 cvs ( from
> > gnugk site ) I've got the following error:
> > >>>
> > In file included from /home/folarte/include/openh323/h323con.h:555,
> > from /home/folarte/include/openh323/h323.h:492,
> > from h323chan.cpp:32:
> > /home/folarte/include/openh323/h323caps.h:289:31: error:
> > ../include/codecs.h: No such file or directory <<<
> >
> > My setup is
> > ptlib 2.8.2, 'configure --prefix=$HOME', make opt, make install.
> > h323plus 2010-05-25 cvs, 'configure ..... --prefix=$HOME', make
> > opt, make install.
> >
> > I end up having the following include directory:
> >
> > folarte at gkaps ~ $ ls -l ~/include
> > total 44
> > drwxr-xr-x 8 folarte folarte 4096 Aug 10 18:12 openh323
> > -r--r--r-- 1 folarte folarte 23668 Aug 10 18:08 ptbuildopts.h
> > drwxr-xr-x 2 folarte folarte 4096 Aug 10 18:08 ptclib drwxr-xr-x 3
> > folarte folarte 4096 Aug 10 18:08 ptlib
> > -r--r--r-- 1 folarte folarte 4794 Aug 10 18:08 ptlib.h folarte at gkaps
> > ~ $ find include -name h323caps.h -ls
> > 1056359 104 -r--r--r-- 1 folarte folarte 105274 Aug 10 18:12
> > include/openh323/h323caps.h
> > folarte at gkaps ~ $ find include -name codecs.h -ls
> > 1056338 44 -r--r--r-- 1 folarte folarte 44804 Aug 10 18:12
> > include/openh323/codecs.h
> >
> > And the compilation command issued by yate seems correct:
> >
> > make[1]: Entering directory `/home/folarte/src/yate/modules'
> > g++ -Wall -I.. -I.. -O2 -fno-check-new -fno-exceptions -fPIC
> > -DHAVE_GCC_FORMAT_CHECK -finline -Winline -export-dynamic -shared
> > -Wl,--unresolved-symbols=ignore-in-shared-libs
> > -Wl,--retain-symbols-file,/dev/null -o h323chan.yate -DPHAS_TEMPLATES
> > -D_REENTRANT -DP_HAS_SEMAPHORES -I/home/folarte/include/ptlib
> > -I/home/folarte/include/openh323 h323chan.cpp -L/home/folarte/lib
> > -lopenh323 -L/home/folarte/lib -lpt -L.. -lyate In file included from
> > /home/folarte/include/openh323/h323con.h:555,
> > from /home/folarte/include/openh323/h323.h:492,
> > from h323chan.cpp:32:
> > /home/folarte/include/openh323/h323caps.h:289:31: error:
> > ../include/codecs.h: No such file or directory In file included from
> > /home/folarte/include/openh323/channels.h:190,
> > from /home/folarte/include/openh323/h323caps.h:290,
> > from /home/folarte/include/openh323/h323con.h:555,
> > from /home/folarte/include/openh323/h323.h:492,
> > from h323chan.cpp:32:
> >
> > Browsing cvs for h323caps.c I've found:
> >
> > >>>
> > Revision 1.15 - (view) (download) (as text) (annotate) - [select for
> > diffs] Fri Aug 21 04:35:47 2009 UTC (11 months, 2 weeks ago) by shorne
> > Branch: MAIN
> > Changes since 1.14: +4 -1 lines
> > Diff to previous 1.14
> >
> > Expressly reference codecs.h to avoid problems with windows SDK
> > codecs.h
> >
> > *** h323caps.h 2009/07/09 15:11:12 1.14
> > --- h323caps.h 2009/08/21 04:35:47 1.15
> > ***************
> > *** 27,32 ****
> > --- 27,35 ----
> > * Contributor(s): ______________________________________.
> > *
> > * $Log: h323caps.h,v $
> > + * Revision 1.15 2009/08/21 04:35:47 shorne
> > + * Expressly reference codecs.h to avoid problems with windows SDK
> > + codecs.h
> > + *
> > * Revision 1.14 2009/07/09 15:11:12 shorne
> > * Simplfied and standardised compiler directives
> > *
> > ***************
> > *** 274,280 ****
> > #endif
> >
> >
> > ! #include "codecs.h"
> > #include "channels.h"
> > #include "mediafmt.h"
> >
> > --- 277,283 ----
> > #endif
> >
> >
> > ! #include "../include/codecs.h"
> > #include "channels.h"
> > #include "mediafmt.h"
> >
> >
> > <<<<<<<<<
> >
> > This may fix up problems in windows, but leads to a problem when using
> > the installed version.
> >
> > During make phase in h323 headers are $BASE/h323plus/include, but they
> > get installed to $PREFIX/include/openh323, and become incorrect.
> >
> > I don't know how to fix up these in windows, apart of renaming
> > codecs.h to h323_codecs.h, but I thing reverting the fix should make
> > it work again.
> >
> > Making a symbolic link:
> > folarte at gkaps ~/include $ ln -s openh323 include folarte at gkaps
> > ~/include $ ls -l include lrwxrwxrwx 1 folarte folarte 8 Aug 10 19:32
> > include -> openh323
> >
> > Makes it work again ( note it includes properly, warns later on):
> >
> > make[1]: Entering directory `/home/folarte/src/yate/modules'
> > g++ -Wall -I.. -I.. -O2 -fno-check-new -fno-exceptions -fPIC
> > -DHAVE_GCC_FORMAT_CHECK -finline -Winline -export-dynamic -shared
> > -Wl,--unresolved-symbols=ignore-in-shared-libs
> > -Wl,--retain-symbols-file,/dev/null -o h323chan.yate -DPHAS_TEMPLATES
> > -D_REENTRANT -DP_HAS_SEMAPHORES -I/home/folarte/include/ptlib
> > -I/home/folarte/include/openh323 h323chan.cpp -L/home/folarte/lib
> > -lopenh323 -L/home/folarte/lib -lpt -L.. -lyate In file included from
> > /home/folarte/include/openh323/../include/codecs.h:345,
> > from /home/folarte/include/openh323/h323caps.h:289,
> > from /home/folarte/include/openh323/h323con.h:555,
> > from /home/folarte/include/openh323/h323.h:492,
> > from h323chan.cpp:32:
> > /home/folarte/include/ptlib/ptlib/object.h: In member function
> > 'virtual
> > PBoolean<unnamed>::YateH323_ExternalRTPChannel::InternalIsDescendant(c
> > onst
> > char*) const':
> > /home/folarte/include/ptlib/ptlib/object.h:1107: warning: inlining
> > failed in call to 'virtual PBoolean
> > PObject::InternalIsDescendant(const char*) const': call is unlikely
> > and code size would grow
> > /home/folarte/include/openh323/channels.h:248: warning: called from
> > here
> >
> > but it's an horrible hack.
> >
> > Regards.
> > Francisco Olarte.
> >
>
>
> --
> Jan Willamowius, jan at willamowius.de, http://www.gnugk.org/
>
>
--
Jan Willamowius, jan at willamowius.de, http://www.gnugk.org/
More information about the h323plus
mailing list