CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Linking problems dynamic library

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 1 Post By ata
  • 1 Post By wyldckat
  • 2 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2011, 13:24
Default Linking problems dynamic library
  #1
New Member
 
Join Date: Jun 2011
Location: Rotterdam, the Netherlands
Posts: 9
Rep Power: 15
Van de Leur is on a distinguished road
Dear all,

Using Ubuntu 11.04 I recently upgraded to OF 2.0.1.

I have created a custom library without problems. However, the following error message keeps appearing when I try to use this new library (libfvMotionSolversNew.so):

--> FOAM Warning :
From function dlLibraryTable:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
could not load "libfvMotionSolversNew.so"

For some reason OF cannot find the library, although I did add the line libs ("libfvMotionSolversNew.so"); to the file controlDict.

The new library is placed in the folder $FOAM_USER_LIBBIN, copying it to $FOAM_LIBBIN does not solve the problem.

Does anyone have a suggestion to solve this?

Regards,

Kevin
Van de Leur is offline   Reply With Quote

Old   October 10, 2011, 12:13
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
This is normally how it should work afaik.

Probably the solution is simple, no typo somewhere? Compilation problems? Did you compile with "wmake libso"? Do you have such a problem with other libraries (I guess not)?
Bernhard is offline   Reply With Quote

Old   October 10, 2011, 13:42
Default
  #3
New Member
 
Join Date: Jun 2011
Location: Rotterdam, the Netherlands
Posts: 9
Rep Power: 15
Van de Leur is on a distinguished road
Compiling using "wmake libso" works without problems.
Using the standard libraries provided with OF is also no problem.

The only thing is that OF cannot find the newly created library.

Maybe my 'options' file contains an error in the linking?
Please see below:

EXE_INC = \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/postProcessing/functionObjects/forces/lnInclude \
-I$(LIB_SRC)/fvMotionSolver/lnInclude \

LIB_LIBS = \
-L$(FOAM_USER_LIBBIN) \
-ltriSurface \
-lmeshTools \
-ldynamicMesh \
-lfiniteVolume \
/*-lforces include in controlDict if needed */
Van de Leur is offline   Reply With Quote

Old   October 11, 2011, 04:22
Default
  #4
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi
I think you must remove the "back slash"(\) from the last lines:
EXE_INC = \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/postProcessing/functionObjects/forces/lnInclude \
-I$(LIB_SRC)/fvMotionSolver/lnInclude

LIB_LIBS = \
-L$(FOAM_USER_LIBBIN) \
-ltriSurface \
-lmeshTools \
-ldynamicMesh \
-lfiniteVolume
Mahmoud Abbaszadeh likes this.
ata is offline   Reply With Quote

Old   October 21, 2011, 10:18
Default
  #5
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
If you add the options you specified in:
  • The original "options" file of the library you based your code on
  • AND in the "options" file of your use Make directory
it should work out of the box.
As a matter of fact, your library should then be usable even without adding the line:
Code:
libs("libfvMotionSolversNew.so");
in the controlDict file.

Hope this helps.

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   October 21, 2011, 10:20
Default
  #6
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
Of course, don't forget to recompile the original library once you changed the "options" file...
Fransje is offline   Reply With Quote

Old   October 21, 2011, 10:37
Default
  #7
Senior Member
 
David Gaden
Join Date: Apr 2009
Location: Winnipeg, Canada
Posts: 437
Rep Power: 22
marupio is on a distinguished road
I've encountered linking problems trying to compile it in Ubuntu 11.10. See this thread: http://www.cfd-online.com/Forums/ope...tml#post328779

It could be related, and it could be a compiler issue.
__________________
~~~
Follow me on twitter @DavidGaden
marupio is offline   Reply With Quote

Old   October 21, 2011, 11:51
Default
  #8
New Member
 
Join Date: Jun 2011
Location: Rotterdam, the Netherlands
Posts: 9
Rep Power: 15
Van de Leur is on a distinguished road
Dear all,

Thanks for the replies.

I just found another message running OF 2.0.1, it says to disallow user-supplied system cal operations, see below:

(...)
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Create time

(...)

I guess OF doesn't allow me to access my new library?

Secondly, it seems that the new library does work when using OF 1.7.1. That is, there are no problems accessing the library and I can start debugging.

Although I'm a bit short on time (who isn't?) I'll get back on this.

Regards,

Kevin
Van de Leur is offline   Reply With Quote

Old   October 21, 2011, 12:13
Default
  #9
Senior Member
 
Francois
Join Date: Jun 2010
Posts: 107
Rep Power: 21
Fransje will become famous soon enough
No, it shouldn't matter.

The
Quote:
allowSystemOperations : Disallowing user-supplied system call operations
quote is output during my runs as well, but doesn't block the loading of my extra libraries.

Kind regards,

Francois.
Fransje is offline   Reply With Quote

Old   October 22, 2011, 09:26
Default
  #10
Senior Member
 
David Boger
Join Date: Mar 2009
Location: Penn State Applied Research Laboratory
Posts: 146
Rep Power: 17
boger is on a distinguished road
I ran into a problem loading a library in 2.0.x yesterday, and a colleague suggested this solution, which helped a lot. I added the following lines to OpenFOAM-2.0.x/src/OSspecific/POSIX/POSIX.C. In that file, around line 1138, you'll find this line:
Code:
void* handle = ::dlopen(lib.c_str(), RTLD_LAZY|RTLD_GLOBAL);
Just below that line, add the following:
Code:
// find error (if any)
    Info << "Checking for error" << endl;
    char *error = ::dlerror();

    if (error)
    {
        WarningIn("dlOpen(const fileName&)")
            << "dlopen error : " << error
            << endl;
    }
You'll then need to recompile by typing ./Allwmake in the POSIX directory, then I would suggest "rm $FOAM_LIBBIN/libOpenFOAM.so", then go to src/OpenFOAM and type "wmake libso".

With that, you should get more information on why the .so file wouldn't load. (In my case, I found that I forgot that I also needed to first load a second .so file.)

I've submitted this as a "feature request" to OpenCFD, so maybe future versions will give better feedback.

Hope it helps!

David
__________________
David A. Boger
boger is offline   Reply With Quote

Old   July 30, 2012, 23:19
Default
  #11
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Dear All

I have also created my custom library without problems. However, I am also getting the following error message when I try to use this new library (libfvMotionSolversNew.so):

--> FOAM Warning :
From function dlLibraryTable:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96

Could you help me please?

Best
Mahdi
mm.abdollahzadeh is offline   Reply With Quote

Old   July 31, 2012, 02:19
Default
  #12
ata
Senior Member
 
ata's Avatar
 
ata kamyabi
Join Date: Aug 2009
Location: Kerman
Posts: 323
Rep Power: 18
ata is on a distinguished road
Hi
Did you add the library name to the controldict?
ata is offline   Reply With Quote

Old   July 31, 2012, 05:02
Default
  #13
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

Mahdi, I got the private message you sent me. You should have also indicated the thread where you asked your question as well.

Either way, this isn't sufficient information:
Quote:
Originally Posted by mm.abdollahzadeh View Post
I have also created my custom library without problems. However, I am also getting the following error message when I try to use this new library (libfvMotionSolversNew.so):

--> FOAM Warning :
From function dlLibraryTable:pen(const fileName&, const bool)
in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 96
Ata is right in asking about whether you added the library to "controlDict", but there is more information I believe is necessary for properly diagnosing the problem, namely:
  • What steps did you take for creating the new library?
  • How are you making the library load? Did you directly link or specify it in "controlDict"?
  • What did you do to get that warning message?
  • That message probably isn't alone, therefore it would be very useful to see the surrounding text to that message!
Best regards,
Bruno
mm.abdollahzadeh likes this.
__________________
wyldckat is offline   Reply With Quote

Old   July 31, 2012, 06:50
Default
  #14
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Dear Bruno and Ata

Thanks for your kind reply. I am working with OpenFOAM-2.0.x on Ubuntu 10.04 LTS. to create my boundary condition I did that :

1- I have copied the turbulentTemperatureCoupledBaffleMixed boundary condition and renamed it to myturbulentTemperatureCoupledBaffleMixed
2-secondly I have done my changes
3- I complied it as a dynamic library with wmake libso.

then I have tested two things.
1-first I just added a libs ("mylibfinvoll.so"); to the controldict and start running and then I got the following message.

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.0.x
Exec   : ppplasmaFoam
Date   : Jul 31 2012
Time   : 10:26:01
Host   : octopus100.ubi.pt
PID    : 30164
Case   : /home/mahdi/OpenFOAM/mahdi-2.0.x/run/mmunfer
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName&)
    in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99
    could not load "mylibfinvoll.so"
Create fluid mesh for region MainAir for time = 0

Create solid mesh for region Dielectric for time = 0

Reading field p

Reading field U



--> FOAM FATAL IO ERROR: 
Unknown patchField type compressible::myturbulentTemperatureCoupledBaffleMixed for patch type directMappedWall

Valid patchField types are :

98
(
MarshakRadiation
MarshakRadiationFixedT
advective
alphatJayatillekeWallFunction
alphatWallFunction
atmBoundaryLayerInletEpsilon
buoyantPressure
calculated
codedFixedValue
compressible::epsilonWallFunction
compressible::kqRWallFunction
compressible::omegaWallFunction
compressible::temperatureThermoBaffle1D<constSolidThermoPhysics>
compressible::temperatureThermoBaffle1D<expoSolidThermoPhysics>
compressible::turbulentHeatFluxTemperature
compressible::turbulentMixingLengthDissipationRateInlet
compressible::turbulentMixingLengthFrequencyInlet
compressible::turbulentTemperatureCoupledBaffle
compressible::turbulentTemperatureCoupledBaffleMixed
compressible::turbulentTemperatureRadCoupledMixed
cyclic
cyclicSlip
directMapped
directMappedField
directMappedFixedInternalValue
directMappedFixedPushedInternalValue
directionMixed
empty
epsilonWallFunction
fan
fanPressure
fixedEnthalpy
fixedFluxPressure
fixedGradient
fixedInternalEnergy
fixedInternalValue
fixedPressureCompressibleDensity
fixedValue
freestream
freestreamPressure
gradientEnthalpy
gradientInternalEnergy
greyDiffusiveRadiation
greyDiffusiveRadiationViewFactor
htcConvection
inletOutlet
inletOutletTotalTemperature
kappatJayatillekeWallFunction
kqRWallFunction
mixed
mixedEnthalpy
mixedInternalEnergy
mutLowReWallFunction
mutURoughWallFunction
mutUSpaldingWallFunction
mutUWallFunction
mutkRoughWallFunction
mutkWallFunction
nonuniformTransformCyclic
nuSgsUSpaldingWallFunction
nutLowReWallFunction
nutTabulatedWallFunction
nutURoughWallFunction
nutUSpaldingWallFunction
nutUWallFunction
nutkRoughWallFunction
nutkWallFunction
omegaWallFunction
oscillatingFixedValue
outletInlet
outletMappedUniformInlet
partialSlip
processor
processorCyclic
rotatingTotalPressure
selfContainedDirectMapped
sliced
slip
symmetryPlane
syringePressure
timeVaryingMappedFixedValue
timeVaryingTotalPressure
timeVaryingUniformFixedValue
totalFlowRateAdvectiveDiffusive
totalPressure
totalTemperature
turbulentHeatFluxTemperature
turbulentInlet
turbulentIntensityKineticEnergyInlet
turbulentMixingLengthDissipationRateInlet
turbulentMixingLengthFrequencyInlet
uniformDensityHydrostaticPressure
uniformFixedValue
wallHeatTransfer
waveTransmissive
wedge
wideBandDiffusiveRadiation
zeroGradient
)


file: /home/mahdi/OpenFOAM/mahdi-2.0.x/run/mmunfer/0/MainAir/phielec::boundaryField::interfaceA from line 27 to line 31.

    From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
    in file /home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 135.

FOAM exiting


2- secondly instead of adding the libentry in controldict i add the library to Option file my solver which looks like:

Code:
EXE_INC = \
    -Iinclude \
    -Ifluid \
    -Isolid \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
    -I$(LIB_SRC)/transportModels \
    -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/turbulenceModels \
    -I$(LIB_SRC)/thermophysicalModels/basicSolidThermo/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
    -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel/lnInclude 

EXE_LIBS = \
    -lincompressibleTurbulenceModel \
    -lincompressibleRASModels \
    -lincompressibleLESModels \
    -lincompressibleTransportModels \
    -lfiniteVolume \
    -lcompressibleRASModels \
    -lmeshTools \
    -lspecie \
    -L$(FOAM_USER_LIBBIN)/ \
    -lbasicSolidThermo
then I started running but I have got the following error:

Code:
*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.0.x
Exec   : ppplasmaFoam
Date   : Jul 31 2012
Time   : 10:45:33
Host   : octopus100.ubi.pt
PID    : 1158
Case   : /home/mahdi/OpenFOAM/mahdi-2.0.x/run/mmunfer
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create fluid mesh for region MainAir for time = 0

Create solid mesh for region Dielectric for time = 0

Reading field p

Reading field U



--> FOAM FATAL IO ERROR: 
Unknown patchField type compressible::myturbulentTemperatureCoupledBaffleMixed for patch type directMappedWall

Valid patchField types are :

98
(
MarshakRadiation
MarshakRadiationFixedT
advective
alphatJayatillekeWallFunction
alphatWallFunction
atmBoundaryLayerInletEpsilon
buoyantPressure
calculated
codedFixedValue
compressible::epsilonWallFunction
compressible::kqRWallFunction
compressible::omegaWallFunction
compressible::temperatureThermoBaffle1D<constSolidThermoPhysics>
compressible::temperatureThermoBaffle1D<expoSolidThermoPhysics>
compressible::turbulentHeatFluxTemperature
compressible::turbulentMixingLengthDissipationRateInlet
compressible::turbulentMixingLengthFrequencyInlet
compressible::turbulentTemperatureCoupledBaffle
compressible::turbulentTemperatureCoupledBaffleMixed
compressible::turbulentTemperatureRadCoupledMixed
cyclic
cyclicSlip
directMapped
directMappedField
directMappedFixedInternalValue
directMappedFixedPushedInternalValue
directionMixed
empty
epsilonWallFunction
fan
fanPressure
fixedEnthalpy
fixedFluxPressure
fixedGradient
fixedInternalEnergy
fixedInternalValue
fixedPressureCompressibleDensity
fixedValue
freestream
freestreamPressure
gradientEnthalpy
gradientInternalEnergy
greyDiffusiveRadiation
greyDiffusiveRadiationViewFactor
htcConvection
inletOutlet
inletOutletTotalTemperature
kappatJayatillekeWallFunction
kqRWallFunction
mixed
mixedEnthalpy
mixedInternalEnergy
mutLowReWallFunction
mutURoughWallFunction
mutUSpaldingWallFunction
mutUWallFunction
mutkRoughWallFunction
mutkWallFunction
nonuniformTransformCyclic
nuSgsUSpaldingWallFunction
nutLowReWallFunction
nutTabulatedWallFunction
nutURoughWallFunction
nutUSpaldingWallFunction
nutUWallFunction
nutkRoughWallFunction
nutkWallFunction
omegaWallFunction
oscillatingFixedValue
outletInlet
outletMappedUniformInlet
partialSlip
processor
processorCyclic
rotatingTotalPressure
selfContainedDirectMapped
sliced
slip
symmetryPlane
syringePressure
timeVaryingMappedFixedValue
timeVaryingTotalPressure
timeVaryingUniformFixedValue
totalFlowRateAdvectiveDiffusive
totalPressure
totalTemperature
turbulentHeatFluxTemperature
turbulentInlet
turbulentIntensityKineticEnergyInlet
turbulentMixingLengthDissipationRateInlet
turbulentMixingLengthFrequencyInlet
uniformDensityHydrostaticPressure
uniformFixedValue
wallHeatTransfer
waveTransmissive
wedge
wideBandDiffusiveRadiation
zeroGradient
)


file: /home/mahdi/OpenFOAM/mahdi-2.0.x/run/mmunfer/0/MainAir/phielec::boundaryField::interfaceA from line 27 to line 31.

    From function fvPatchField<Type>::New(const fvPatch&, const DimensionedField<Type, volMesh>&, const dictionary&)
    in file /home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/finiteVolume/lnInclude/fvPatchFieldNew.C at line 135.

FOAM exiting

Do you think that it it could be related to DL_LIBrary_PATH?
I have readed in some of the threads in forum.

Best
Mahdi
mm.abdollahzadeh is offline   Reply With Quote

Old   July 31, 2012, 07:24
Default
  #15
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
In a nutshell:
  • It should be "libmyfinvoll.so", not "mylibfinvoll.so".
  • In your solver you don't have "-lmyfinvoll".
__________________
wyldckat is offline   Reply With Quote

Old   July 31, 2012, 08:07
Default
  #16
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Dear Burno

Thanks for your kind reply

I have corrected the name. but it didn't solved. if i don't add in the solver I will receive the same message.
but if add it it will gives the follwing error:
Code:
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-100 -Iinclude -Ifluid -Isolid -I/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/meshTools/lnInclude -I/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/turbulenceModels/incompressible/turbulenceModel -I/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/transportModels -I/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/transportModels/incompressible/singlePhaseTransportModel -I/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/finiteVolume/lnInclude -I/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/turbulenceModels -I/home/mahdi/OpenFOAM/mahdi-2.0.x/src/MultiRegionBound/lnInclude -I/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/thermophysicalModels/basicSolidThermo/lnInclude -I/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/thermophysicalModels/specie/lnInclude -I/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/turbulenceModels/compressible/turbulenceModel/lnInclude  -IlnInclude -I. -I/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/OpenFOAM/lnInclude -I/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/src/OSspecific/POSIX/lnInclude   -fPIC -Xlinker --add-needed Make/linux64Gcc45DPOpt/incompressibleCourantNo.o Make/linux64Gcc45DPOpt/solidRegionDiffNo.o Make/linux64Gcc45DPOpt/ppplasmaFoam.o -L/home/mahdi/centFOAM//OpenFOAM/OpenFOAM-2.0.x/platforms/linux64Gcc45DPOpt/lib \
         -lincompressibleTurbulenceModel -lincompressibleRASModels -lincompressibleLESModels -lincompressibleTransportModels -lfiniteVolume -lcompressibleRASModels -lmeshTools -lspecie -lmyfinvoll -lbasicSolidThermo  -lOpenFOAM -ldl   -lm -o /home/mahdi/OpenFOAM/mahdi-2.0.x/platforms/linux64Gcc45DPOpt/bin/ppplasmaFoam
/usr/bin/ld: cannot find -lmyfinvoll
collect2: ld returned 1 exit status
make: *** [/home/mahdi/OpenFOAM/mahdi-2.0.x/platforms/linux64Gcc45DPOpt/bin/ppplasmaFoam] Error 1
best mahdi
mm.abdollahzadeh is offline   Reply With Quote

Old   July 31, 2012, 17:45
Default
  #17
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Mahdi,

I'm too tired right now to guess was going on wrong... well, I can guess that you removed the last "-L*" line and replaced it with the "-lmyfinvoll", when you should have added the last one.

Either way, here are a few tutorials on how to modify OpenFOAM code for personal modifications, for you to study and draw ideas from:
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   August 2, 2012, 11:52
Default
  #18
Senior Member
 
mahdi abdollahzadeh
Join Date: Mar 2011
Location: Covilha,Portugal
Posts: 153
Rep Power: 15
mm.abdollahzadeh is on a distinguished road
Dear Buruno

Thanks for your kind reply.... the first problem as you mwntioned was with the name of library.
and the second was that I didnt add the correct libralry when compiling my own library ...( but it was compiling correctly and without any waring or error!!!)...

When I add that library and changed the name, it works ...

Thanks for your help.
mm.abdollahzadeh is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 12:12
OpenFOAM with Cygwin kitchener OpenFOAM Installation 6 April 25, 2006 00:09
previewing dynamic mesh emma chen FLUENT 2 May 12, 2003 04:52
unstructured grid sreekanth Main CFD Forum 1 August 6, 2001 16:09
Good library to solve huge linear system Ricardo Bonon Main CFD Forum 3 May 19, 2000 07:24


All times are GMT -4. The time now is 02:54.