Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. g++ _fullpath compilation error

g++ _fullpath compilation error

Scheduled Pinned Locked Moved C / C++ / MFC
c++helphardware
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    PaulS_UK
    wrote on last edited by
    #1

    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

    L J 2 Replies Last reply
    0
    • P PaulS_UK

      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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      The message says it is not declared in this scope, and identifies lines 172 and 185 as being where the error occurs. You need to look at those two lines to see what may be the reason.

      1 Reply Last reply
      0
      • P PaulS_UK

        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

        J Offline
        J Offline
        Jochen Arndt
        wrote on last edited by
        #3

        _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.

        P 1 Reply Last reply
        0
        • J Jochen Arndt

          _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.

          P Offline
          P Offline
          PaulS_UK
          wrote on last edited by
          #4

          Aha! Thanks Jochen I'll look into that: the clue was there with the underscore?

          J 1 Reply Last reply
          0
          • P PaulS_UK

            Aha! Thanks Jochen I'll look into that: the clue was there with the underscore?

            J Offline
            J Offline
            Jochen Arndt
            wrote on last edited by
            #5

            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.

            P 1 Reply Last reply
            0
            • J Jochen Arndt

              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.

              P Offline
              P Offline
              PaulS_UK
              wrote on last edited by
              #6

              Thanks - I really appreciate it!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups