g++ _fullpath compilation error
-
Hi I'm trying to compile a c++ project on a raspberry pi using g++. I get the following compilation error: PROCESS.CPP: In function ‘int process(int, char*, ControlData*, char*, char*)’: PROCESS.CPP:172:49: error: ‘_fullpath’ was not declared in this scope PROCESS.CPP:185:45: error: ‘_fullpath’ was not declared in this scope The file PROCESS.CPP has the header
#include
which I thought should contain this declaration. I have checked the header path using the g++ -H command and it gives /usr/include/stdlib.h so I presume it is finding the file. I don't want to start fiddling with my own declarations within the scope as there are many other files to include in this project. Any help would be appreciated
-
Hi I'm trying to compile a c++ project on a raspberry pi using g++. I get the following compilation error: PROCESS.CPP: In function ‘int process(int, char*, ControlData*, char*, char*)’: PROCESS.CPP:172:49: error: ‘_fullpath’ was not declared in this scope PROCESS.CPP:185:45: error: ‘_fullpath’ was not declared in this scope The file PROCESS.CPP has the header
#include
which I thought should contain this declaration. I have checked the header path using the g++ -H command and it gives /usr/include/stdlib.h so I presume it is finding the file. I don't want to start fiddling with my own declarations within the scope as there are many other files to include in this project. Any help would be appreciated
-
Hi I'm trying to compile a c++ project on a raspberry pi using g++. I get the following compilation error: PROCESS.CPP: In function ‘int process(int, char*, ControlData*, char*, char*)’: PROCESS.CPP:172:49: error: ‘_fullpath’ was not declared in this scope PROCESS.CPP:185:45: error: ‘_fullpath’ was not declared in this scope The file PROCESS.CPP has the header
#include
which I thought should contain this declaration. I have checked the header path using the g++ -H command and it gives /usr/include/stdlib.h so I presume it is finding the file. I don't want to start fiddling with my own declarations within the scope as there are many other files to include in this project. Any help would be appreciated
_fullpath
is a Microsoft specific library function that does not exist on Unix systems. You may use the realpath[^] function instead. [EDIT/UPDATE] Because pathes are different on Unix and MS operating systems, the function call can't be simply replaced. I assume that you are tyring to compile some source that has been originally written for a Microsoft OS. You have to analyse the code and rewrite it to get similar behaviour on your Pi. -
_fullpath
is a Microsoft specific library function that does not exist on Unix systems. You may use the realpath[^] function instead. [EDIT/UPDATE] Because pathes are different on Unix and MS operating systems, the function call can't be simply replaced. I assume that you are tyring to compile some source that has been originally written for a Microsoft OS. You have to analyse the code and rewrite it to get similar behaviour on your Pi. -
You are welcome. The underscore is a clue because it is not used with Unix libraries (at least the common ones). To get the description for standard library functions on your Pi just type "man ". I was quite sure that
fullpath
does not exist and checked it this way. -
You are welcome. The underscore is a clue because it is not used with Unix libraries (at least the common ones). To get the description for standard library functions on your Pi just type "man ". I was quite sure that
fullpath
does not exist and checked it this way.