Menu

MCPP does not support UNC paths in includes

2009-03-12
2013-05-28
  • Dwayne Boone

    Dwayne Boone - 2009-03-12

    It appears that mcpp does not support UNC paths for include directives. For example I have a file Test.h that is accesable via a UNC path:

    E:\src\test>dir "\\BEAST\Beast Documents\Test.h"
    Volume in drive \\BEAST\Beast Documents has no label.
    Volume Serial Number is 6462-6FF5

    Directory of \\BEAST\Beast Documents

    03/12/2009  11:52 AM                 0 Test.h
                   1 File(s)              0 bytes
                   0 Dir(s)     289,890,304 bytes free

    Now when I run mcpp on a file that just does "#include <Test.h>" I get the following:

    E:\src\test>mcpp -I"\\BEAST\Beast Documents" Test.cpp
    #line 1 "E:/src/test/Test.cpp"
    E:/src/test/Test.cpp:1: error: Can't open include file "Test.h"
        #include <Test.h>
    1 error in preprocessor.

    But as I showed above Test.h is present in "\\BEAST\Beast Documents"

     
    • Kiyoshi Matsui

      Kiyoshi Matsui - 2009-03-14

      On my Windows systems, mcpp seems to work fine with UNC.

      Would you inform me what type of mcpp you tested, such as version, compiler and build-type?

      Any other user's informations on this problem are welcome too.

      However, I'm now busy, sorry.  I'm going to move my dwelling, and can't connect to the Internet for a week from now on.  I'll check your informations when I get settled.

       
    • Dwayne Boone

      Dwayne Boone - 2009-03-23

      I am using v2.7.2 on Windows XP compiled with VS2005. I am not doing anything special wrt build just

      cd mcpp-2.7.2/src
      patch -p0 < ../noconfig/vc2005.dif
      nmake /f ../noconfig/visualc.mak

      I can then run mcpp on a file that is using a UNC path. IE the following works

      E:\src\test>mcpp "\\BEAST\Beast Documents\Test.h"
      #line 1 "//BEAST/Beast Documents/Test.h"
      class Test
      {
      };

      But I cannot use the UNC path in an include directive. This fails

      E:\src\test>mcpp -I"\\BEAST\Beast Documents" Test.cpp
      #line 1 "E:/src/test/Test.cpp"
      E:/src/test/Test.cpp:1: error: Can't open include file "Test.h"
          #include <Test.h>
      1 error in preprocessor.

      Test.h is definitely present in "\\BEAST\Beast Documents" as is shown by the fact that running mcpp directly on it works.

       
    • Dwayne Boone

      Dwayne Boone - 2009-04-07

      Looked into this some more and the issue is that _stat call is failing for "\\BEAST\Beast Documents". It turns out that _stat does work not for for UNC paths if the path is just the share folder. If I use a extra dir, ie "\\BEAST\Beast Documents\include" then it works. I am not sure if there is anything that can be done about this.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.