#include <pj/types.h>No Such File or Directory


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 11 of 11

Thread: #include <pj/types.h>No Such File or Directory

  1. #1
    Join Date
    May 2007
    Posts
    843

    #include <pj/types.h>No Such File or Directory

    Hello to all, i need access the external header file from third party in Visual Studio.

    I have settings the additional include directory but the files still cannot be found.

    I sure that file located at the directory pj and the types.h is exist in the directory.

    C:\Program Files\VOIP\pjproject-1.4\pjproject-1.4\pjsip\
    C:\Program Files\VOIP\pjproject-1.4\pjproject-1.4\pjlib\include\pj\compat
    C:\Program Files\VOIP\pjproject-1.4\pjproject-1.4\pjlib\include\pj
    Any hints ?
    C:\Program Files\VOIP\pjproject-1.4\pjproject-1.4\pjsip\include
    C:\Program Files\VOIP\pjproject-1.4\pjproject-1.4\pjsip\include\pjsua-lib

    The types.h locates at thisC:\Program Files\VOIP\pjproject-1.4\pjproject-1.4\pjlib\include\pj

    I often encounter this kind of error when using third party source library.

    Any hints

    Please help.

    Thanks.

  2. #2
    Join Date
    Dec 2007
    Posts
    401
    add
    Code:
    C:\Program Files\VOIP\pjproject-1.4\pjproject-1.4\pjlib\include\
    to the list of directories to be searched for included header files.

  3. #3
    Join Date
    May 2007
    Posts
    843
    I follow your advise add this
    C:\Program Files\VOIP\pjproject-1.4\pjproject-1.4\pjsip\include\

    C:\Program Files\VOIP\pjproject-1.4\pjproject-1.4\pjsip\
    to the Additional Include Directory but Visual Studio 2005

    Thanks for your help.

    The problem now become worse than before.
    This library is VOIP PJLib.
    Error:
    Code:
    Error	1	error C3861: 'strlen': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjlib\include\pj\string.h	93	
    Error	2	error C3861: 'strlen': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjlib\include\pj\string.h	125	
    Error	3	error C3861: 'memchr': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjlib\include\pj\string.h	472	
    Error	4	error C3861: 'memset': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjlib\include\pj\string.h	604	
    Error	5	error C3861: 'memset': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjlib\include\pj\string.h	620	
    Error	6	error C3861: 'memcpy': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjlib\include\pj\string.h	634	
    Error	7	error C3861: 'memmove': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjlib\include\pj\string.h	648	
    Error	8	error C3861: 'memcmp': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjlib\include\pj\string.h	662	
    Error	9	error C3861: 'memchr': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjlib\include\pj\string.h	677	
    Warning	10	warning C4244: '=' : conversion from '__w64 unsigned int' to 'unsigned int', possible loss of data	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjmedia\include\pjmedia\types.h	515	
    Warning	11	warning C4244: '=' : conversion from '__w64 int' to 'unsigned int', possible loss of data	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjmedia\include\pjmedia\circbuf.h	218	
    Warning	12	warning C4244: '=' : conversion from '__w64 int' to 'unsigned int', possible loss of data	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjmedia\include\pjmedia\circbuf.h	254	
    Warning	13	warning C4244: '=' : conversion from '__w64 int' to 'unsigned int', possible loss of data	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjmedia\include\pjmedia\circbuf.h	256	
    Error	14	error C3861: 'assert': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjmedia\include\pjmedia\stereo.h	82	
    Error	15	error C3861: 'assert': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjmedia\include\pjmedia\stereo.h	131	
    Error	16	error C3861: 'assert': identifier not found	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjmedia\include\pjmedia\stereo.h	132	
    Error	17	fatal error C1083: Cannot open include file: 'pjnath/ice_strans.h': No such file or directory	c:\program files\voip\pjproject-1.4\pjproject-1.4\pjmedia\include\pjmedia\transport_ice.h	30
    Please help.

    Thanks.

  4. #4
    Join Date
    Nov 2003
    Posts
    4,118
    You need to #include <cstdlib> and <cstring>.
    Danny Kalev

  5. #5
    Join Date
    May 2007
    Posts
    843
    I guess the string.h is custom written by the author of pjlib and i try to included those header you suggest in main.cpp and string.h but still cannot solve it.

    Please help.

    Thanks.

  6. #6
    Join Date
    May 2007
    Posts
    843
    I solve it by remove all the Additional Include directory and include necessary directory only.

    You can simply include unnecessar directory.

    When the compile complain a directory, then i include the directory only.

    Now my problem is i cannot find the definition of the pjsua_core.c in all directory.

    Does anyone know it ?

    Thanks.
    Last edited by Peter_APIIT; 09-30-2009 at 10:58 AM.

  7. #7
    Join Date
    Dec 2003
    Posts
    3,366
    Add the .c files to the project directly. Add the .h files to the project directly. Add the folder to the project * as you have done. It should all clear up, with any luck.


    -----------
    *
    I dislike ever adding a folder to the project and prefer that everything is expressed only in code. When you start using the compiler/makefile/other to contain information required to compile, the entire project collapses (requires months to unravel and fix) if you get a new compiler or a new operating system, etc.

    So I typically use explicit includes of the entire path (something like ../../lib/libname/*.file). I happily modify the library's files to use the explicit path too, often this is several hundred changes you have to make to their darn header files (most library vendors insist on making a mess here) but once you are done (and, the changes are pretty easy to make, paste the same thing in front of each problem the compiler finds the issues) you have a nice setup that will work no matter where you copy it. It will work if you swap compilers and OS. It will work if the binary soup that compilers make goes bad, and it will work without a platform specific makefile that could fail when you move to a new machine. Note that you have to maintain a relative folder structure for your project to remain intact, and you should document that structure and be consistent across projects.

    Why do all that? Nothing is worse that punching build on a project to find that it won't compile because "fatal error: cannot find <something.h> " included in "library.cpp". <something.h> could be *anywhere* on any machine in your network, on a mapped drive, or on a machine that is turned off in some kids basement in eastern mongolia. "../lib/library/something.h" is clearly expected to be a folder up in the lib directory.

    The folder and project tools are very nice, dont get me wrong, but they are only nice until they stop working, and then it can be a major nightmare to fix it.

  8. #8
    Join Date
    May 2007
    Posts
    843
    You saying that include a folder into whole project mess up when moving from one pc to another pc.

    Therefore, you only explicit include the library path into your source code.

    Please correct me if i was wrong.

    The problem now is there is no .c file and .lib file from the library after i build it using visual studio 2005.

    You can try to download the pjlib from here .

    I totally agree with you that compiler error are very annoying because of the library problem.

    Please help.

    Thanks.

  9. #9
    Join Date
    Dec 2003
    Posts
    3,366
    Quote Originally Posted by Peter_APIIT View Post
    You saying that include a folder into whole project mess up when moving from one pc to another pc.

    Therefore, you only explicit include the library path into your source code.

    Please correct me if i was wrong.

    The problem now is there is no .c file and .lib file from the library after i build it using visual studio 2005.

    You can try to download the pjlib from here .

    I totally agree with you that compiler error are very annoying because of the library problem.

    Please help.

    Thanks.
    If there is no .lib file, something is wrong.
    Usually all you have to do is find and add a .lib file to your project, and include the headers, and its done. You may or may not also need to drop a dll in the final setup but thats not needed during compile.

    For now use the visual folder path and do things normally. You can decide later if you want to bypass it. Lets get the project working normally before we tamper....

    I will take a quick look at the project, but I have a pretty simple approach to such things: the tool compiles out of the box and works right away, or I delete it and find another way if at all possible.

  10. #10
    Join Date
    Dec 2003
    Posts
    3,366
    It does not compile, the library is broken. You probably need to interact with their support at this point, I am not going to have time to fix someone else's broken project to make a library that I am not even going to use.

    You might try making it under GCC with cygwin or something. From the looks of it, visual studio support is an afterthought and it started as a unix library, so one of the 60 make files might work, if you use the scripts they provided somehow with it.

  11. #11
    Join Date
    May 2007
    Posts
    843
    Thanks for your reply.

Similar Threads

  1. syntax error from function in include file
    By larryy@indiana. in forum ASP.NET
    Replies: 1
    Last Post: 03-20-2009, 02:29 PM
  2. Replies: 4
    Last Post: 08-28-2008, 06:42 PM
  3. Include file into current project
    By maxChin in forum ASP.NET
    Replies: 4
    Last Post: 04-04-2005, 09:59 AM
  4. Replies: 2
    Last Post: 05-29-2003, 11:37 AM
  5. File uploading / objFile.Write problem
    By Tomer Cagan in forum ASP.NET
    Replies: 1
    Last Post: 07-24-2001, 10:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center