Error when using wmake libso



  • 请问大家出现这种错误该如何排查

    COMMAND:wmake libso .
    
    
    wmakeLnInclude: linking include files to ./lnInclude
    ln: failed to create symbolic link './TomiyamaLiftForce.C': File exists
    ln: failed to create symbolic link './TomiyamaLiftForce.H': File exists
    


  • 你是动了Tomiyamalift了么?



  • 是的,加了力矩计算


  • Linux讲师 OpenFOAM讲师

    你的改动的地方是OpenFOAM自保留的部分。那里的东西都被各种脚本安排的明明白白不能乱动。如果要修改,需要另起炉灶。最粗暴的也要把修改过的文件放到当前文件夹,然后include的时候把<>换成“”



  • @yuhxFoamer 同意楼上,如果说要建立自己的模型,最好是重新再user_src复制一个该模型,改个名字。



  • @bestucan 我是另起炉灶搞得,没有改源代码


  • Linux讲师 OpenFOAM讲师

    @yuhxFoamer 那个错误很清楚啊,就是你在它想要放链接的位置已经放了一个同名的文件。我的意思是源代码的位置要另起炉灶,不是内容。或者哪怕位置不另起炉灶,不要用人家用过的文件名字。



  • @bestucan 是的,我在另外一个位置搞的,名字也改了


  • Linux讲师 OpenFOAM讲师

    @yuhxFoamer 那你的炉灶起的太干净了……都是手动的,很容易出问题。
    比如wmakeLnInclude的描述

    # Description
    #     Link all the source files in the <dir> directory into <dir>/lnInclude
    

    应该是 link 到某个 lnInclud 的,wmake是个加壳的make。在foam文件夹下的wmake里有操作过程。wmake调用wmakeLnIncludeAll,wmakeLnIncludeAll调用wmakeLnInclude。硬调也不是不能调。问题可能在option。

    植入代码这种事情,如果不是轻车熟路。有个笨方法,但很稳。先把自带的A复制成A1,除了名字什么都不动,基本不会出错。然后再趁计算机不注意,把A1里的东西悄咪咪的、慢慢的换成你的。期间常编译看效果。



  • @bestucan 我是整个植入完了再编译的,我看其他没啥问题,就这里编译过不去



  • @bestucan 这都还没到wmake的编译错误,这里只是wmake libso


  • Linux讲师 OpenFOAM讲师

    @yuhxFoamer 这哪里是编译不过去,这都没开始编译。wmake就是腾挪源文件的,g++给的才是编译错误。libso 只是 wmake 的运行参数,这个错误只是bash脚本里写的输出。 不过你的命令提示符真是绝了,才看件那是个命令


  • Linux讲师 OpenFOAM讲师

    那啥,你把"."去了就行了눈_눈



  • @bestucan

    intermediateNew$ wmake libso
    wmake libso .
    g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3  -DNoRepository -ftemplate-depth-100 -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/lagrangian/basic/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/lagrangian/distributionModels/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/transportModels/compressible/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/thermophysicalModels/specie/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/thermophysicalModels/basic/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/thermophysicalModels/thermophysicalProperties/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/thermophysicalModels/reactionThermo/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/thermophysicalModels/SLGThermo/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/thermophysicalModels/radiation/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/transportModels -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/regionModels/regionModel/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/regionModels/surfaceFilmModels/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/dynamicFvMesh/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/sampling/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/finiteVolume/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude -I/home/hoyu/OpenFOAM/OpenFOAM-5.x/src/OSspecific/POSIX/lnInclude   -fPIC -c parcels/derived/basicKinematicParcel/defineBasicKinematicParcel.C -o Make/linux64GccDPInt32Opt/parcels/derived/basicKinematicParcel/defineBasicKinematicParcel.o
    In file included from lnInclude/KinematicParcel.H:692:0,
                     from parcels/derived/basicKinematicParcel/basicKinematicParcel.H:40,
                     from parcels/derived/basicKinematicParcel/defineBasicKinematicParcel.C:26:
    lnInclude/KinematicParcelI.H:127:8: error: prototype for ‘Foam::KinematicParcel<ParcelType>::KinematicParcel(const Foam::polyMesh&, const barycentric&, Foam::label, Foam::label, Foam::label, Foam::label, Foam::scalar, Foam::scalar, Foam::scalar, const vector&, const vector&, const Foam::KinematicParcel<ParcelType>::constantProperties&)’ does not match any in class ‘Foam::KinematicParcel<ParcelType>’
     inline Foam::KinematicParcel<ParcelType>::KinematicParcel
    
    

    sorry我看眼花了,多加了个点这下输出真正的编译错误了


Log in to reply
 

CFD中文网 2016 - 2020 | 京ICP备15017992号-2