Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Installation and building / Compile error - getpid was not declared in this scope

Compile error - getpid was not declared in this scope

Compile error - getpid was not declared in this scope
Charles Bradshaw 2012/09/27 17:30
I'm trying to do a source install of OpenCASCADE653.tar.gz, configure succeeds copy of config.log attached.

I have the following compile error from make make -j8 install

../../../ros/src/OSD/OSD_MemInfo.cxx: In member function 'void OSD_MemInfo::Update()':
../../../ros/src/OSD/OSD_MemInfo.cxx:87:61: error: 'getpid' was not declared in this scope

How can I fix this problem?
You have to be logged in to download the attached file
Forum supervisor 2012/09/27 18:13
Dear Charles,
'getpid' declared in /usr/include/unistd.h
In RHEL the distributive package glibc-headers contains this file.
Could you check that package glibc-headers is installed.
Regards
Charles Bradshaw 2012/09/27 20:04
Hi Thanks for the quick reply.

/usr/include/unistd.h is present from glibc-devel 2.15-57.fc17 and
$ cat /usr/include/unistd.h | grep getpid
extern __pid_t getpid (void) __THROW;

Which I don't understand.

Charles Bradshaw 2012/09/27 21:54

The answer appears to be that neither OSD_MemInfo.cxx or OSD_MemInfo.hxx include unstd.h !

Where should the #include <unistd.h> statement go?
Forum supervisor 2012/10/01 12:22
Dear Charles,
Current implementation of OSD_MedInfo.cxx (development version) contains inclusion of 'unistd.h'.
See below.

#if (defined(_WIN32) || defined(__WIN32__))
#include <windows.h>
#include <winbase.h>
#include <process.h>
#include <Psapi.h>
#ifdef _MSC_VER
#pragma comment(lib, "Psapi.lib")
#endif
#elif (defined(__APPLE__))
#include <mach/task.h>
#include <mach/mach.h>
#else
#include <unistd.h>
#endif

Regards
AlexanderPletzer 2012/10/26 21:33
Hi,

I encountered the same error on Fedora 17 using      
g++ (GCC) 4.7.2 20120921 (Red Hat 4.7.2-2)

Is there any way we can access the development version? Thanks.
Forum supervisor 2012/10/29 09:48
Dear Alexander,

The development version is available via the Collaborative portal - "http://dev.opencascade.org/index.php?q=home/get_involved".
Regards
 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map