Trying to add socket code; get compiler error Re: Now getting linker errors Re: Building a PJSIP project: VC++ 2008 can't find isalnum, isalpha, etc.

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

 



I had paths to the PJSIP include files specified in
Tools - Options - Proj. & Solns - VC++ dirs - Include files. (VS9 or 2008).
in my program (1), but that didn't stop the socket programming
from building.
I have just found that if I include any one of the following in my
source as my only change:

#include "pjsip.h"
#include "pjmedia.h"
#include "pjmedia-codec.h"
#include "pjsip_ua.h"
#include "pjsip_simple.h"
#include "pjlib-util.h"
#include "pjlib.h"

then I get the error:
error C2039: 's_addr' : is not a member of 'in_addr' (etc)
for the line: SendAddr.sin_addr.s_addr = inet_addr(SendIp);

-It must be something in the PJSIP include files that's making me
use the MS Windows SDK where the definition of in_addr is different.

Here are all my includes from above where I add the PJSIP includes:
#include "stdafx.h"
#include <winsock.h>
#include <string>	// needs "using namespace std;"
#include <iostream>
#include <stdlib.h>
#pragma comment(lib,"ws2_32.lib")

Does anyone know how I can work around this conflict?

Best regards,
George

---------- Original message ----------
From: G Orley <geo.orley@xxxxxxxxx>
Date: Tue, Jun 17, 2008 at 8:23 PM
Subject: Trying to add socket code; get compiler error Re: Now getting
linker errors Re: Building a PJSIP project: VC++ 2008 can't find
isalnum, isalpha, etc.
To: pjsip list <pjsip at lists.pjsip.org>

Hi All,

(2) I tried adding some socket programming (actually going back to
my whole program that had socket programming and PJSIP code)
to my code, but got the compiler error:
error C2039: 's_addr' : is not a member of 'in_addr'
for the line: SendAddr.sin_addr.s_addr = inet_addr(SendIp);
helpful additional message:
"c:\program files\microsoft sdks\windows\v6.0a\include\inaddr.h(22) :
see declaration of 'in_addr'"

This is odd because a VC++ 2008 project with just the socket code
(1) builds fine!
The PJSIP code (3) that I was posting about earlier, that I got building
as a result of earlier help, (see thanks below), was actually taken from
my overall program referred to in sentence (2) above. I got the program
of (2) by adding the PJSIP code to the socket code (1). (Then I made
(3) with just the PJSIP code and got it building as per the bunch of
the previous posts -- (3) was where I came in on this discussion list).

So now I'm back to (2) from before my first appearance on this list.
I incorporated in it the things I learned from (3) to get the PJSIP part
building, but now the socket stuff won't compile!

Does anyone have any idea why? My approach is now to try again from
(1), that builds, and add the PJSIP stuff to it to make (2) again, and adjust
its build environment yet again as in (3) to try to see what breaks it.
In the meantime, if anyone knows the reason, I'd sure like to see it!
Thanks.

Best regards,
George

---------- Original message ----------
From: G Orley <geo.orley@xxxxxxxxx>
Date: Mon, Jun 16, 2008 at 7:23 PM
Subject: Now getting linker errors Re: Building a PJSIP
project: VC++ 2008 can't find isalnum, isalpha, etc.
To: pjsip list <pjsip at lists.pjsip.org>

Thanks Nanang, Alan,

I didn't know about adding the library names in
Project->Properties->Linker->Input->Additional Dependencies;
I had thought that just giving a path would be enough.
Also the idea to go look at a working example was
a good reminder.
I've got it building now!

Thanks again,
George
 http://s299.photobucket.com/albums/mm286/Rubens_Dawn/Emoticons/?action=view&current=bangheadsmiley.gif
:-)



[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