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

how to link object file into my executable

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2014, 12:49
Default how to link object file into my executable
  #1
New Member
 
Stefanie
Join Date: Oct 2014
Posts: 7
Rep Power: 11
SprayStef is on a distinguished road
Hi everyone,

I need to link object files into mySprayFoam. There is a whole set of object that are all related.

Here's the story: it more or less a standalone programm, written in C++, that I want to incorporate in my OpenFoam-solver. I have all the .cc the .h and .o files.

My plan was to compile the .cc and .h files into .o files and then link them when compiling my solver.

Now.... HOW do I do that?

I tried to simply include them in Make/options , but that didn't work out too well...

Can anybody help? PLEASE!

Or do I have the wrong approach and this isn't even possible in OpenFoam? Do I need to link the .o 's into a .so library and then include in the Make/options - file

Cheers,
Stef
SprayStef is offline   Reply With Quote

Old   November 2, 2014, 19:59
Default
  #2
Member
 
Gregoire Junqua
Join Date: Jun 2011
Location: China
Posts: 58
Blog Entries: 1
Rep Power: 14
gregjunqua is on a distinguished road
Hi Stef

What do you mean by standalone? You wanna make an exe file?
Why not using the wmake tool compile your files and the solver? it would be easier.



I don't know if you need it, but in case :

Quote:
http://www.tfd.chalmers.se/~hani/kur...lenceModel.pdf
It's a tutorial for implementing a turbulence model. It gives great tips in programming for openFoam and it is "ready to use"

Then if you want a more direct way of programming a solver you should have a look of :
http://www.tfd.chalmers.se/~hani/kur...ChangeFoam.pdf
(it is not the best one, but it explain the steps of compiling your own solver)
__________________
-------------------------------------------------------
Gregoire Junqua
Ocean University of China
PhD Oceanography/ABL turbulence
-------------------------------------------------------
gregjunqua 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
wmake compiling new solver mksca OpenFOAM Programming & Development 14 June 22, 2018 06:29
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 01:22
[foam-extend.org] Error compiling OpenFOAM-1.6-ext Canesin OpenFOAM Installation 137 January 20, 2016 14:56
OpenFOAM without MPI kokizzu OpenFOAM Installation 4 May 26, 2014 09:17
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 19:41.