我openfoam6中的dirToString和wmkdep被误删了,请问这两个该怎么编译



  • 路径是home/zcy/OpenFOAM/OpenFOAM-6/wmake/platforms/linux64Gcc
    在其他虚拟机中OpenFOAM显示的样子
    5WNI}X}S)IO2GK15WW`LTUB.png


  • CORE 网格教授 OpenFOAM教授 管理员

    拷贝复制过去就行,如果别的文件没删除只删除这两个的话



  • @东岳 在编译openfoam6时是输入./Allwmake进行编译,此时终端会输出:

    Allwmake /home/zcy/OpenFOAM/OpenFOAM-6
    gcc -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -O3   -fPIC dirToString.c -o /home/zcy/OpenFOAM/OpenFOAM-6/wmake/platforms/linux64Gcc/dirToString
    flex wmkdep.l; \
    gcc -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -O3   -fPIC lex.yy.c -o /home/zcy/OpenFOAM/OpenFOAM-6/wmake/platforms/linux64Gcc/wmkdep
    lex.yy.c:1264:17: warning: ‘yyunput’ defined but not used [-Wunused-function]
         static void yyunput (int c, char * yy_bp )
                     ^
    lex.yy.c:1307:16: warning: ‘input’ defined but not used [-Wunused-function]
         static int input  (void)
                    ^
    Allwmake: no ThirdParty directory found - skipping
    Allwmake src
    

    这个时候dirToString和wmkdep应该已经编译好了,我想知道能不能在编译而不是复制这两个,给上Allwmake脚本内容

    #!/bin/sh
    cd ${0%/*} || exit 1    # Run from this directory
    
    # Parse arguments for library compilation
    . wmake/scripts/AllwmakeParseArguments
    # Perform various checks
    wmakeCheckPwd "$WM_PROJECT_DIR" || {
        echo "Allwmake error: Current directory is not \$WM_PROJECT_DIR"
        echo "    The environment variables are inconsistent with the installation."
        echo "    Check the OpenFOAM entries in your dot-files and source them."
        exit 1
    }
    
    [ -n "$FOAM_EXT_LIBBIN" ] || {
        echo "Allwmake error: FOAM_EXT_LIBBIN not set"
        echo "    Check the OpenFOAM entries in your dot-files and source them."
        exit 1
    }
    
    # Compile wmake support applications
    (cd wmake/src && make)
    
    # Compile ThirdParty libraries and applications
    if [ -d "$WM_THIRD_PARTY_DIR" ]
    then
        $WM_THIRD_PARTY_DIR/Allwmake
    else
        echo "Allwmake: no ThirdParty directory found - skipping"
    fi
    
    # Compile OpenFOAM libraries and applications
    src/Allwmake $targetType $*
    
    # Compile OpenFOAM libraries and applications
    applications/Allwmake $targetType $*
    

  • CORE 网格教授 OpenFOAM教授 管理员

    可以没问题,直接用吧 :duang:


 

Forest
Mountains