Xcode and PJSIP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



All,

I want to build a softphone using PJSIP on MAX OS X with MAC OS X UI.  
NOTE: this is not about the iPhone SDK.

I first tried to create a build environment for PJSIP in Xcode and  
found this to be significantly beyond my skill level. I was not simply  
wanting to call out from Xcode to a make/makefile environment - can  
use the latter directly. So, I simply built PJSIP with the usual  
"configure/make dep/make" commands and satisfied myself that all was  
working well using the sample applications.

Now I would like to use Xcode to build my application. I have created  
a small project with the following code:

#define PJ_AUTOCONF 1
#include <stdio.h>
#include <pjlib.h>
int main (int argc, const char * argv[]) {
     printf("\nHello PJSIP\n\n");
	return 0;
}

Within Xcode, I'm getting two errors related to pj_jmp_buf stating  
"error: syntax error before 'pj_jmp_buf'" in except.h (line 295) and  
setjmp.h (line 30). There are also some warnings related to these  
errors. I've attached the build results at the end of this message.

I'm not sure how to solve these errors or the warnings about "implicit  
declarations".

When I follow the PJSIP instructions regarding GNU Make, I can build  
the file without error and run it without problem.

Any suggestions or corrections would be appreciated.

Here are the build results from Xcode:

Building target ?mypjsua? of project ?mypjsua? with configuration  
?Debug? ? (2 errors, 24 warnings)
	    cd /Users/mcclen/development/xcode/mypjsua
     /Developer/usr/bin/gcc-4.0 -x c -arch i386 -fmessage-length=0 - 
pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 - 
Wreturn-type -Wunused-variable -isysroot /Developer/SDKs/ 
MacOSX10.5.sdk -mfix-and-continue -mmacosx-version-min=10.5 -gdwarf-2 - 
iquote /Users/mcclen/development/xcode/mypjsua/build/mypjsua.build/ 
Debug/mypjsua.build/mypjsua-generated-files.hmap -I/Users/mcclen/ 
development/xcode/mypjsua/build/mypjsua.build/Debug/mypjsua.build/ 
mypjsua-own-target-headers.hmap -I/Users/mcclen/development/xcode/ 
mypjsua/build/mypjsua.build/Debug/mypjsua.build/mypjsua-all-target- 
headers.hmap -iquote /Users/mcclen/development/xcode/mypjsua/build/ 
mypjsua.build/Debug/mypjsua.build/mypjsua-project-headers.hmap -F/ 
Users/mcclen/development/xcode/mypjsua/build/Debug -I/Users/mcclen/ 
development/xcode/mypjsua/build/Debug/include -I/Users/mcclen/trunk/ 
pjlib/include -I/Users/mcclen/trunk/pjlib/include/pj -I/Users/mcclen/ 
trunk/pjlib/include/pj++ -I/Users/mcclen/trunk/pjlib/include/pj/compat  
-I/Users/mcclen/trunk/pjlib-util/include -I/Users/mcclen/trunk/pjlib- 
util/include/pjlib-util -I/Users/mcclen/trunk/pjnath/include -I/Users/ 
mcclen/trunk/pjnath/include/pjnath -I/Users/mcclen/trunk/pjmedia/ 
include -I/Users/mcclen/trunk/pjmedia/include/pjmedia -I/Users/mcclen/ 
trunk/pjmedia/include/pjmedia-codec -I/Users/mcclen/trunk/pjsip/ 
include -I. -I/Users/mcclen/trunk/pjsip/include/pjsip-simple -I/Users/ 
mcclen/trunk/pjsip/include/pjsip-ua -I/Users/mcclen/trunk/pjsip/ 
include/pjsua-lib -I/Users/mcclen/development/xcode/mypjsua/build/ 
mypjsua.build/Debug/mypjsua.build/DerivedSources -c /Users/mcclen/ 
development/xcode/mypjsua/main.c -o /Users/mcclen/development/xcode/ 
mypjsua/build/mypjsua.build/Debug/mypjsua.build/Objects-normal/i386/ 
main.o
In file included from /Users/mcclen/trunk/pjlib/include/pjlib.h:33,
                  from /Users/mcclen/development/xcode/mypjsua/main.c:3:
/Users/mcclen/trunk/pjlib/include/pj/ctype.h: In function 'pj_isalnum':
/Users/mcclen/trunk/pjlib/include/pj/ctype.h:48: warning: implicit  
declaration of function 'isalnum'
/Users/mcclen/trunk/pjlib/include/pj/ctype.h: In function 'pj_isalpha':
/Users/mcclen/trunk/pjlib/include/pj/ctype.h:57: warning: implicit  
declaration of function 'isalpha'
/Users/mcclen/trunk/pjlib/include/pj/ctype.h: In function 'pj_isdigit':
/Users/mcclen/trunk/pjlib/include/pj/ctype.h:75: warning: implicit  
declaration of function 'isdigit'
/Users/mcclen/trunk/pjlib/include/pj/ctype.h: In function 'pj_isspace':
/Users/mcclen/trunk/pjlib/include/pj/ctype.h:84: warning: implicit  
declaration of function 'isspace'
/Users/mcclen/trunk/pjlib/include/pj/ctype.h: In function 'pj_islower':
/Users/mcclen/trunk/pjlib/include/pj/ctype.h:93: warning: implicit  
declaration of function 'islower'
/Users/mcclen/trunk/pjlib/include/pj/ctype.h: In function 'pj_isupper':
/Users/mcclen/trunk/pjlib/include/pj/ctype.h:103: warning: implicit  
declaration of function 'isupper'
/Users/mcclen/trunk/pjlib/include/pj/ctype.h: In function 'pj_tolower':
/Users/mcclen/trunk/pjlib/include/pj/ctype.h:119: warning: implicit  
declaration of function 'tolower'
/Users/mcclen/trunk/pjlib/include/pj/ctype.h: In function 'pj_toupper':
/Users/mcclen/trunk/pjlib/include/pj/ctype.h:126: warning: implicit  
declaration of function 'toupper'
/Users/mcclen/trunk/pjlib/include/pj/ctype.h: In function 'pj_isxdigit':
/Users/mcclen/trunk/pjlib/include/pj/ctype.h:135: warning: implicit  
declaration of function 'isxdigit'
In file included from /Users/mcclen/trunk/pjlib/include/pj/except.h:29,
                  from /Users/mcclen/trunk/pjlib/include/pjlib.h:35,
                  from /Users/mcclen/development/xcode/mypjsua/main.c:3:
/Users/mcclen/trunk/pjlib/include/pj/compat/setjmp.h: At top level:
/Users/mcclen/trunk/pjlib/include/pj/compat/setjmp.h:30: error: syntax  
error before 'pj_jmp_buf'
/Users/mcclen/trunk/pjlib/include/pj/compat/setjmp.h:30: warning: type  
defaults to 'int' in declaration of 'pj_jmp_buf'
/Users/mcclen/trunk/pjlib/include/pj/compat/setjmp.h:30: warning: data  
definition has no type or storage class
In file included from /Users/mcclen/trunk/pjlib/include/pjlib.h:35,
                  from /Users/mcclen/development/xcode/mypjsua/main.c:3:
/Users/mcclen/trunk/pjlib/include/pj/except.h:295: error: syntax error  
before 'pj_jmp_buf'
/Users/mcclen/trunk/pjlib/include/pj/except.h:295: warning: no  
semicolon at end of struct or union
In file included from /Users/mcclen/trunk/pjlib/include/pj/math.h:29,
                  from /Users/mcclen/trunk/pjlib/include/pjlib.h:46,
                  from /Users/mcclen/development/xcode/mypjsua/main.c:3:
/Users/mcclen/trunk/pjlib/include/pj/string.h: In function 'pj_cstr':
/Users/mcclen/trunk/pjlib/include/pj/string.h:93: warning: implicit  
declaration of function 'strlen'
/Users/mcclen/trunk/pjlib/include/pj/string.h:93: warning:  
incompatible implicit declaration of built-in function 'strlen'
/Users/mcclen/trunk/pjlib/include/pj/string.h: In function 'pj_strset2':
/Users/mcclen/trunk/pjlib/include/pj/string.h:125: warning:  
incompatible implicit declaration of built-in function 'strlen'
/Users/mcclen/trunk/pjlib/include/pj/string.h: In function 'pj_strchr':
/Users/mcclen/trunk/pjlib/include/pj/string.h:472: warning: implicit  
declaration of function 'memchr'
/Users/mcclen/trunk/pjlib/include/pj/string.h: In function 'pj_bzero':
/Users/mcclen/trunk/pjlib/include/pj/string.h:604: warning: implicit  
declaration of function 'memset'
/Users/mcclen/trunk/pjlib/include/pj/string.h:604: warning:  
incompatible implicit declaration of built-in function 'memset'
/Users/mcclen/trunk/pjlib/include/pj/string.h: In function 'pj_memset':
/Users/mcclen/trunk/pjlib/include/pj/string.h:620: warning:  
incompatible implicit declaration of built-in function 'memset'
/Users/mcclen/trunk/pjlib/include/pj/string.h: In function 'pj_memcpy':
/Users/mcclen/trunk/pjlib/include/pj/string.h:634: warning: implicit  
declaration of function 'memcpy'
/Users/mcclen/trunk/pjlib/include/pj/string.h:634: warning:  
incompatible implicit declaration of built-in function 'memcpy'
/Users/mcclen/trunk/pjlib/include/pj/string.h: In function 'pj_memmove':
/Users/mcclen/trunk/pjlib/include/pj/string.h:648: warning: implicit  
declaration of function 'memmove'
/Users/mcclen/trunk/pjlib/include/pj/string.h:648: warning:  
incompatible implicit declaration of built-in function 'memmove'
/Users/mcclen/trunk/pjlib/include/pj/string.h: In function 'pj_memcmp':
/Users/mcclen/trunk/pjlib/include/pj/string.h:662: warning: implicit  
declaration of function 'memcmp'
		                 from /Users/mcclen/development/xcode/mypjsua/main.c: 
3:
			In file included from /Users/mcclen/trunk/pjlib/include/pjlib.h:33,
				/Users/mcclen/trunk/pjlib/include/pj/ctype.h:48: warning: implicit  
declaration of function 'isalnum'
				/Users/mcclen/trunk/pjlib/include/pj/ctype.h:57: warning: implicit  
declaration of function 'isalpha'
				/Users/mcclen/trunk/pjlib/include/pj/ctype.h:75: warning: implicit  
declaration of function 'isdigit'
				/Users/mcclen/trunk/pjlib/include/pj/ctype.h:84: warning: implicit  
declaration of function 'isspace'
				/Users/mcclen/trunk/pjlib/include/pj/ctype.h:93: warning: implicit  
declaration of function 'islower'
				/Users/mcclen/trunk/pjlib/include/pj/ctype.h:103: warning:  
implicit declaration of function 'isupper'
				/Users/mcclen/trunk/pjlib/include/pj/ctype.h:119: warning:  
implicit declaration of function 'tolower'
				/Users/mcclen/trunk/pjlib/include/pj/ctype.h:126: warning:  
implicit declaration of function 'toupper'
				/Users/mcclen/trunk/pjlib/include/pj/ctype.h:135: warning:  
implicit declaration of function 'isxdigit'
		                 from /Users/mcclen/development/xcode/mypjsua/main.c: 
3:
			                 from /Users/mcclen/trunk/pjlib/include/pjlib.h:35,
				In file included from /Users/mcclen/trunk/pjlib/include/pj/ 
except.h:29,
					/Users/mcclen/trunk/pjlib/include/pj/compat/setjmp.h: At top level:
					/Users/mcclen/trunk/pjlib/include/pj/compat/setjmp.h:30: error:  
syntax error before 'pj_jmp_buf'
					/Users/mcclen/trunk/pjlib/include/pj/compat/setjmp.h:30: warning:  
type defaults to 'int' in declaration of 'pj_jmp_buf'
					/Users/mcclen/trunk/pjlib/include/pj/compat/setjmp.h:30: warning:  
data definition has no type or storage class
		                 from /Users/mcclen/development/xcode/mypjsua/main.c: 
3:
			In file included from /Users/mcclen/trunk/pjlib/include/pjlib.h:35,
				/Users/mcclen/trunk/pjlib/include/pj/except.h:295: error: syntax  
error before 'pj_jmp_buf'
				/Users/mcclen/trunk/pjlib/include/pj/except.h:295: warning: no  
semicolon at end of struct or union
		                 from /Users/mcclen/development/xcode/mypjsua/main.c: 
3:
			                 from /Users/mcclen/trunk/pjlib/include/pjlib.h:46,
				In file included from /Users/mcclen/trunk/pjlib/include/pj/math.h: 
29,
					/Users/mcclen/trunk/pjlib/include/pj/string.h:93: warning:  
implicit declaration of function 'strlen'
					/Users/mcclen/trunk/pjlib/include/pj/string.h:93: warning:  
incompatible implicit declaration of built-in function 'strlen'
					/Users/mcclen/trunk/pjlib/include/pj/string.h:125: warning:  
incompatible implicit declaration of built-in function 'strlen'
					/Users/mcclen/trunk/pjlib/include/pj/string.h:472: warning:  
implicit declaration of function 'memchr'
					/Users/mcclen/trunk/pjlib/include/pj/string.h:604: warning:  
implicit declaration of function 'memset'
					/Users/mcclen/trunk/pjlib/include/pj/string.h:604: warning:  
incompatible implicit declaration of built-in function 'memset'
					/Users/mcclen/trunk/pjlib/include/pj/string.h:620: warning:  
incompatible implicit declaration of built-in function 'memset'
					/Users/mcclen/trunk/pjlib/include/pj/string.h:634: warning:  
implicit declaration of function 'memcpy'
					/Users/mcclen/trunk/pjlib/include/pj/string.h:634: warning:  
incompatible implicit declaration of built-in function 'memcpy'
					/Users/mcclen/trunk/pjlib/include/pj/string.h:648: warning:  
implicit declaration of function 'memmove'
					/Users/mcclen/trunk/pjlib/include/pj/string.h:648: warning:  
incompatible implicit declaration of built-in function 'memmove'
					/Users/mcclen/trunk/pjlib/include/pj/string.h:662: warning:  
implicit declaration of function 'memcmp'
Build failed (2 errors, 24 warnings)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20081227/d917b371/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux