Building a PJSIP project: VC++ 2008 can't find isalnum, isalpha, etc.

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

 



Hi George,

Since you are starting from the ground up, I suspect that you may not
have the proper config_site.h stuff set up.  Try this:

At the _very_ beginning of your source file (before the header
#include's) add the following:

#define PJ_HAS_CTYPE_H	1

If that doesn't work, change the #define to 0.

Regards,
Jim Gomes


> -----Original Message-----
> From: pjsip-bounces@xxxxxxxxxxxxxxx
[mailto:pjsip-bounces at lists.pjsip.org] On Behalf Of
> G Orley
> Sent: Thursday, 12 June, 2008 12:25 PM
> To: pjsip list
> Subject: Re: Building a PJSIP project: VC++ 2008 can't find
isalnum,isalpha, etc.
> 
> I should also mention that previous to my original message in this
> thread, I successfully built the entire PJSIP download, including
> pjsip_simple. The only trick there was installing DirectX so that
> dsound.h was found. There I used the VS 2008 solution that was
> included with the download of PJSIP. Now I'm trying to create my
> own VS 2008 solution from scratch (creating that Win32 console
> application) and build-in the PJSIP libraries. I was inspired by
> the page "Getting started 2":
> http://trac.pjsip.org/repos/wiki/Getting_Started_Using --
> It is actually titled "Building Application using PJSIP with GNU
Tools"
> when you bring up the page and the only line of any relevance,
> at all, to VS 2008 seemed to be
> "2. Create a directory outside the PJSIP sources for your project and
> place your source files there."
> Hence I thought I would stumble along, creating my own VS 2008
> solution using the VS 2008 project/solution creation wizard from
> File - New - Project totally from scratch, just specifying the paths
> to the PJSIP header files and libraries.
> 
> So I wonder if I should instead, open up the PJSIP solution that
> it came with and that I previously had success with, and try adding
> my project within *that* context? I think I'll give that a shot.
> As has been commented on the PJSIP website, there certainly isn't
> a lot of "for dummies" information available about this...
> As usual, there are obviously many approaches that will mess up,
> but only one or two that will work. It's amazing the many creative
ways
> that people will find to mess up...
> 
> I guess I should ask: what is the correct approach to building a
> PJSIP project with VS 2008?
> 
> Best regards,
> George
> 
> ---------- Original message ----------
> From: G Orley <geo.orley@xxxxxxxxx>
> Date: Thu, Jun 12, 2008 at 3:12 PM
> Subject: Re: Building a PJSIP project: VC++ 2008 can't find
> isalnum, isalpha, etc.
> To: pjsip list <pjsip at lists.pjsip.org>
> 
> I should mention that the only modifications I made to my
> solution after creating the Win32 Console project was to add
> those PJSIP include and library paths in VC++ 2008
> Project - Properties (Alt+F7) - Configuration
> Properties - C/C++ - General - "Additional Include Directories",
> as shown in my original message "Sent: Thursday, 12 June,
> 2008 9:06 AM".
> I have previously successfully built many VC++ 2008
> projects with the same computer setup that I have now,
> but this is my first time trying to include the PJSIP
> libraries.
> 
> ---------- Original message ----------
> From: G Orley <geo.orley@xxxxxxxxx>
> Date: Thu, Jun 12, 2008 at 2:52 PM
> Subject: Re: Building a PJSIP project: VC++ 2008 can't find
> isalnum, isalpha, etc.
> To: pjsip list <pjsip at lists.pjsip.org>
> 
> Hi Jim,
> 
> >I'm trying to figure out which project
> >you are compiling, but it's not clear from your original message.
> 
> I also created my own custom self-maintained project.
> The solution and project name are both PJSIP080612, and my .cpp file
is
> also called PJSIP080612.cpp. It is made from selected copy-
> and-pastes from pjproject-0.8.0\pjsip-apps\src\samples\ simpleua.c ; I
am
> only after the PJMedia code. The entire listing of PJSIP080612.cpp
> is shown in my original message; I created no .h files or other
> source files. I made it a Win32 console project, only intended
> to run in a DOS Window/Command prompt, if I can ever get
> it to compile!
> My project was in C:\Documents and Settings\
>  User\My
Documents\Xxxxxx\XXXX_XXX_XXX\_My_VS2008_projects\PJSIP080612\ .
> and I had PJSIP in C:\Documents and Settings\User\My
> Documents\Xxxxxx\XXXX_XXX_XXX\pjproject-0.8.0\ .
> I moved my PJSIP080612 "solution" (to be
> precise) to C:\Projects that I created and PJSIP (that is,
> the pjproject-0.8.0 folder) to C:\SomeLibs\ that I also created,
> making the modifications to the paths in
> Project - Properties (Alt+F7) - Configuration
> Properties - C/C++ - General - "Additional Include Directories",
> but got exactly the same results. Then I moved my
> PJSIP080612 solution folder to be a subdir of pjproject-0.8.0,
> (i.e., right in the pjproject-0.8.0 folder), fixing up the paths
> in Project - Properties (Alt+F7) - Configuration
> Properties - C/C++ - General - "Additional Include Directories"
> again (this time using relative paths), but still got exactly
> the same results of 83 errors.
> 
> I'm now going to go over the settings that you sent, to
> see if I can adopt them.
> 
> Could you email me your whole solution, in a "zip" file,
> so that I can work from your settings? Of course, please
> cut down your source to maybe just one PJSIP API call
> that still compiles, so that you don't divulge your
> confidential work.
> 
> Thanks so much for your assistance.
> 
> Best regards,
> George
> 
> ---------- Original message ----------
> From: Jim Gomes <Jim.Gomes@xxxxxxxxxxxxx>
> Date: Thu, Jun 12, 2008 at 1:54 PM
> Subject: Re: Building a PJSIP project: VC++ 2008 can't find
> isalnum, isalpha, etc.
> To: pjsip list <pjsip at lists.pjsip.org>
> 
> Hi,
> 
> I also compile with VS2008, and I have created my own custom
> self-maintained project files.  I'm trying to figure out which project
> you are compiling, but it's not clear from your original message.  So,
> I'll just start with some general trouble-shooting advice based on the
> assumption that you are building pjsip_simple.
> 
> My pre-processor definitions are as follows:
> 
> Debug:  _DEBUG;PJ_WIN32=1;PJ_M_I386=1;WIN32;_LIB;PJ_CONFIG_DEBUG
> 
> Release: NDEBUG;PJ_WIN32=1;PJ_M_I386=1;WIN32;_LIB;PJ_CONFIG_SHIPPING
> 
> Here is my entire command line:
> 
> /O2 /Ob2 /Oi /Ot /GL /I "../include" /I "../../pjlib-util/include" /I
> "../../pjlib/include" /D "NDEBUG" /D "PJ_WIN32=1" /D "PJ_M_I386=1" /D
> "WIN32" /D "_LIB" /D "PJ_CONFIG_SHIPPING" /D "_VC80_UPGRADE=0x0600" /D
> "_MBCS" /GF /FD /EHsc /MD /Gy
/Fp"Release\pjsip_simple\pjsip_simple.pch"
> /Fo"Release\pjsip_simple\\" /Fd"Release\pjsip_simple\vc90.pdb" /W3
> /nologo /c /Gz /TP /errorReport:prompt
> 
> You can compare that to your entire command-line, and if you have
> questions as to which property pages turn on which option, then we can
> go through each setting.
> 
> Regards,
> Jim Gomes
> 
> > -----Original Message-----
> > From: pjsip-bounces@xxxxxxxxxxxxxxx
> [mailto:pjsip-bounces at lists.pjsip.org] On Behalf Of
> > G Orley
> > Sent: Thursday, 12 June, 2008 9:06 AM
> > To: pjsip at lists.pjsip.org
> > Subject: Building a PJSIP project: VC++ 2008 can't find
> isalnum,isalpha, etc.
> >
> > Hi All,
> >
> > I'm having trouble with #includes, seemingly, to find the library
> functions
> > needed by \pjproject-0.8.0\pjlib\include\pj\ctype.h . The compiler
> can't
> > find isalnum, isalpha, etc.
> >
> > I'm using Visual Studio 2008 (Windows XP SP2) . My project is in
> > C:\Documents and Settings\User\My
> > Documents\Xxxxxx\XXXX_XXX_XXX\_My_VS2008_projects\PJSIP080612\ .
> >
> > I've put PJSIP in
> > C:\Documents and Settings\User\My
> Documents\Xxxxxx\XXXX_XXX_XXX\pjproject-
> > 0.8.0\
> >
> > in VS 2008 (VC++ 2008) Project - Properties (Alt+F7) - Configuration
> > Properties - C/C++ -
> > General - "Additional Include Directories" I've added the following:
> > (which made a major
> > improvement in getting as far as I have)
> >
> > C:\Documents and Settings\User\My
> > Documents\Xxxxxx\XXXX_XXX_XXX\pjproject-0.8.0\pjsip\include
> > C:\Documents and Settings\User\My
> > Documents\Xxxxxx\XXXX_XXX_XXX\pjproject-0.8.0\pjsip\lib
> > C:\Documents and Settings\User\My
> > Documents\Xxxxxx\XXXX_XXX_XXX\pjproject-0.8.0\pjmedia\include
> > C:\Documents and Settings\User\My
> > Documents\Xxxxxx\XXXX_XXX_XXX\pjproject-0.8.0\pjmedia\lib
> > C:\Documents and Settings\User\My
> > Documents\Xxxxxx\XXXX_XXX_XXX\pjproject-0.8.0\pjlib-util\include
> > C:\Documents and Settings\User\My
> > Documents\Xxxxxx\XXXX_XXX_XXX\pjproject-0.8.0\pjlib-util\lib
> > C:\Documents and Settings\User\My
> > Documents\Xxxxxx\XXXX_XXX_XXX\pjproject-0.8.0\pjlib\include
> > C:\Documents and Settings\User\My
> > Documents\Xxxxxx\XXXX_XXX_XXX\pjproject-0.8.0\pjlib\lib
> > C:\Documents and Settings\User\My
> > Documents\Xxxxxx\XXXX_XXX_XXX\pjproject-0.8.0\pjlib\include\pj
> >
> > I tried adding the following includes as in the listing that
follows:
> >
> > #include <ctype.h>    // attempt for isalnum()
> > #include <tchar.h>    // attempt for isalnum()
> > #include <locale>     // attempt for isalnum()
> > #include <stdlib> , stdlib.h.
> >
> > -but they didn't help clear up any errors, seemingly (maybe some
> > changes further down, but not
> > to the first few compile errors).
> >
> > Please see the program listing and build log output, below. How can
I
> > clean up these first few
> > errors? The code is selected from the example in
> > pjproject-0.8.0\pjsip-apps\src\samples\ simpleua.c .
> >
> > Best regards,
> > -George
> >
> > --------------------------Program listing--------------------------
> [snip]
> > --------------------------Program listing--------------------------
> > --------------------------build log--------------------------
> [snippety]
> > --------------------------build log--------------------------
> 
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
> 
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



[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