[SFLphone] g722.h - compilation problem (& patch)

Marcin Zajączkowski mszpak at wp.pl
Sun Jul 26 17:06:34 EDT 2009


Hi,


I tried to play with latest snapshot, but I had problem with its 
compilation. sflphone-common-0.9.6~snapshot20090726-0ubuntu1.orig (also 
sflphone-common-0.9.6~rc2-0ubuntu1.orig) returns with:
g722.h:133: error: ‘uint8_t’ was not declared in this scope
(longer trace below).

I dig a little about that and the problem seems to be caused by missing 
stdint.h include. I don't know if it should be included from some other 
file, but attached patch works fine.

Problem occurred with g++ (gcc) 4.4.0 on Fedora 11.


Regards
Marcin



<QUOTE>
make[4]: Entering directory 
`/home/szpak/soft/u/sflphone-common-0.9.6~rc2-0ubuntu1.orig/src/audio/codecs'
g++ -DHAVE_CONFIG_H -I. -I../../..  -I../../../libs 
-I../../../libs/dbus-c++/include -I../../../libs/iax2 
-I../../../libs/pjproject-"1.0.3" -I../../../src -I../../../src/config 
-I../../../test -DPREFIX=\"/usr/local\" 
-DPROGSHAREDIR=\"/usr/local/share/sflphone\"   
-I../../../libs/pjproject-"1.0.3"/pjsip/include 
-I../../../libs/pjproject-"1.0.3"/pjlib/include 
-I../../../libs/pjproject-"1.0.3"/pjlib-util/include 
-I../../../libs/pjproject-"1.0.3"/pjmedia/include 
-I../../../libs/pjproject-"1.0.3"/pjnath/include 
../../../libs/dbus-c++/include/dbus-c++ 
-DCODECS_DIR=\""/usr/local/lib/sflphone/codecs"\" 
-DPLUGINS_DIR=\""/usr/local/lib/sflphone/plugins"\" -DENABLE_TRACE 
-DSFLDEBUG -DHAVE_SPEEX_CODEC -DHAVE_GSM_CODEC  -fPIC -g -Wall -g -Wall 
-O2 -MT libcodec_g722_so-g722.o -MD -MP -MF 
.deps/libcodec_g722_so-g722.Tpo -c -o libcodec_g722_so-g722.o `test -f 
'g722.cpp' || echo './'`g722.cpp
g++: ../../../libs/dbus-c++/include/dbus-c++: linker input file unused 
because linking not done
In file included from g722.cpp:27:
g722.h:133: error: &#8216;uint8_t&#8217; was not declared in this scope
g722.h:133: error: expected primary-expression before &#8216;const&#8217;
g722.h:133: error: expected primary-expression before &#8216;int&#8217;
g722.h:133: error: initializer expression list treated as compound 
expression
g722.h:137: error: &#8216;int16_t&#8217; was not declared in this scope
g722.h:137: error: expected primary-expression before &#8216;const&#8217;
g722.h:137: error: expected primary-expression before &#8216;int&#8217;
g722.h:137: error: initializer expression list treated as compound 
expression
g722.cpp:345: error: ISO C++ forbids declaration of 
&#8216;uint8_t&#8217; with no type
g722.cpp:345: error: expected &#8216;,&#8217; or &#8216;...&#8217; 
before &#8216;g722_data&#8217;
g722.cpp:570: error: &#8216;uint8_t&#8217; has not been declared
g722.cpp: In member function &#8216;virtual int G722::codecDecode(short 
int*, unsigned char*, unsigned int)&#8217;:
g722.cpp:62: error: ISO C++ forbids declaration of &#8216;type 
name&#8217; with no type
g722.cpp:62: error: ISO C++ forbids declaration of &#8216;type 
name&#8217; with no type
g722.cpp:62: error: expected primary-expression before &#8216;const&#8217;
g722.cpp:62: error: expected &#8216;)&#8217; before &#8216;const&#8217;
g722.cpp:59: warning: unused variable &#8216;in_byte&#8217;
g722.cpp: In member function &#8216;virtual int 
G722::codecEncode(unsigned char*, short int*, unsigned int)&#8217;:
g722.cpp:73: error: &#8216;uint8_t&#8217; was not declared in this scope
g722.cpp:73: error: expected primary-expression before &#8216;)&#8217; 
token
g722.cpp: In member function &#8216;int 
G722::g722_encode_release()&#8217;:
g722.cpp:338: warning: no return statement in function returning non-void
g722.cpp: In member function &#8216;int 
G722::g722_decode_release()&#8217;:
g722.cpp:343: warning: no return statement in function returning non-void
g722.cpp: In member function &#8216;int G722::g722_decode(int16_t*, 
int)&#8217;:
g722.cpp:414: error: &#8216;len&#8217; was not declared in this scope
g722.cpp:418: error: &#8216;g722_data&#8217; was not declared in this 
scope
g722.cpp:427: error: &#8216;g722_data&#8217; was not declared in this 
scope
g722.cpp: In member function &#8216;int G722::g722_encode(int*, const 
int16_t*, int)&#8217;:
g722.cpp:768: error: &#8216;uint8_t&#8217; was not declared in this scope
g722.cpp:773: error: &#8216;uint8_t&#8217; was not declared in this scope
g722.cpp:773: error: expected &#8216;;&#8217; before &#8216;code&#8217;
make[4]: *** [libcodec_g722_so-g722.o] Error 1
make[4]: Leaving directory 
`/home/szpak/soft/u/sflphone-common-0.9.6~rc2-0ubuntu1.orig/src/audio/codecs'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory 
`/home/szpak/soft/u/sflphone-common-0.9.6~rc2-0ubuntu1.orig/src/audio'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory 
`/home/szpak/soft/u/sflphone-common-0.9.6~rc2-0ubuntu1.orig/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 
`/home/szpak/soft/u/sflphone-common-0.9.6~rc2-0ubuntu1.orig'
make: *** [all] Error 2
</QUOTE>





--
Ad...

----------------------------------------------------
Podziel się wakacyjnymi wspomnieniami z Bliskimi
wrzucaj zdjęcia, filmy, pisz dziennik
Kliknij: http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fbliscy.html&sid=808
-------------- next part --------------
A non-text attachment was scrubbed...
Name: g722.h-uint8_t-nod-declared.patch
Type: application/octet-stream
Size: 227 bytes
Desc: not available
Url : http://lists.savoirfairelinux.net/pipermail/sflphone/attachments/20090726/d8a77fd4/attachment.obj 


More information about the SFLphone mailing list