Menu

Moritz2/cpp/snippet.cpp:471: error: ‘mkdir’ was not declared in this scope

2013-03-14
2013-03-14
  • Eckard Klotz

    Eckard Klotz - 2013-03-14

    Some days ago I've got the following e-mail from Juan Jose Lopez Villarejo :

    Best regards,
    Eckard Klotz

    Dear Eckard,

    I am sorry that I have not replied before to this e-mail.
    I have just tried to compile with your new instructions.

    I get much less errors, but still:


    MacBook-Pro-de-JUAN-LOPEZ-VILLAREJO:src_Moritz2 jlopezvi$ ./run

    Moritz2/cpp/snippet.cpp: In member function ‘void CL_SNIPPET::SnippetExecution::writeTextFile(std::string, std::string)’:
    Moritz2/cpp/snippet.cpp:471: error: ‘mkdir’ was not declared in this scope
    MuLanPa/process/cpp/notation.cpp:39:26: error: notation_log.h: No such file or directory
    MuLanPa/process/cpp/notation.cpp: In constructor ‘CL_PROCESS::CL_NOTATION::Prcs_Notation::Prcs_Notation(bool, std::string)’:
    MuLanPa/process/cpp/notation.cpp:158: error: ‘defineRuleTemplates’ was not declared in this scope


    And this is the command to compile

    gcc diverse/cpp/.cpp Moritz2/cpp/.cpp MuLanPa/cpp/.cpp MuLanPa/process/cpp/.cpp tool_xml/.cpp tinyxml/.cpp -Idiverse/h -IMoritz2/h -IMuLanPa/h -IMuLanPa/process/h -Itool_xml -Itinyxml -Ispirit-1.8.5-miniboost -D TIXML_USE_STL -D NO_SYSTEM_FOR_FOLDERCREATE

    Yes, I do have a Mac.
    Yes, you have of course my permission to post everything to the Moritz website. Do not hesitate.


    Other thing: Is there another way to access the help of Moritz?

    "In the help of Moritz you will find small
    examples for every flow-structure of c/cpp (if, switch, for, while, do,
    ...) will it be possible for you to define for this examples dot-files
    to describe them as activity-files (one for an if-example, one for a
    switch-example, one for a... )?"

    I did not draw the diagram in .dot, but I can try to figure out how to do this.
    Can you try again the link?
    https://www.lucidchart.com/documents/view/421c-4b1c-4faa337d-9d5f-23c40a7e1d42
    (select 'Show Hotspots)

    Cheers,

    Juan

     
  • Eckard Klotz

    Eckard Klotz - 2013-03-14

    Hello Juan.

    "... MuLanPa/process/cpp/notation.cpp:39:26: error: notation_log.h: No such file or director ..."

    Please find attached the missing source. I forgot to add it in the source-zip. It contains only one function and I think I should move it into an other source for the next release. Until than please add it into the folder "MuLanPa/process/h/"

    "... Other thing: Is there another way to access the help of Moritz? ..."

    You can download the documentation as chm (only readable under windows) or as zipped hmtl-system located in the same download-location like the distributions and the sources. There are 2 user-documentations (ansi-c and python) and 1 developer-documentation, all generated with doxygen.
    You will find the examples I wrote about in "User_Doku_ansi_c_YYYY_MM_DD.zip" where "YYYY_MM_DD" contains the version-date.

    "...Moritz2/cpp/snippet.cpp:471: error: ‘mkdir’ was not declared in this scope ..."
    "...gcc diverse/cpp/.cpp Moritz2/cpp/.cpp ... -D NO_SYSTEM_FOR_FOLDERCREATE ..."
    "...Yes, I do have a Mac. ..."

    Please take a look into the source "snippet.cpp" at the mentioned position. Here you will a compiler-switch

    if defined(NO_SYSTEM_FOR_FOLDERCREATE)

    ...

    else

    ...

    endif

    The function mkdir(...) is only defined for windows . In the linux world I have to use the direct call of a system command. This will simply be done by not defining "NO_SYSTEM_FOR_FOLDERCREATE". If the Mac world is using the same command-syntax like linux this is everything you have to do. But you have to test it out after compiling. If the MAC world is using an other shell-command to create a sub-folder you have to modify the call of the system-command in the line "481" I hope you have some information about this things..

    Best regards,
    Eckard.

     

    Last edit: Eckard Klotz 2013-03-14

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.