# C/++/# Running a C++ code from oomph-lib (a CFD software)

#### joshmccraney

It's not finding the file generic.h. There's probably a link in the Makefile that needs to be edited. How long is the Makefile. Can you pasted it in here? Or if it's too long, can you post it somewhere?

Also, where did you create the josephine_cool directory? Is it in the same directory as joe_cool?
Do you have an email? If so, I can send it to you, as PF isn't letting me upload, and it's too long to paste. I've tried several methods but can't seem to upload it.

The same directory as joe_cool.

#### phyzguy

I don't really want to post my E-mail. Can't you upload it to a site like Google drive or github? There are many such sites.

#### joshmccraney

I don't really want to post my E-mail. Can't you upload it to a site like Google drive or github? There are many such sites.
Okay, here it is on github: https://github.com/joshmccraney/oomph-lib-files

PS thanks! Didn't realize this was so easily possible (uploading files for anyone).

Last edited:

#### phyzguy

Okay, here it is on github: https://github.com/joshmccraney/oomph-lib-files

PS thanks! Didn't realize this was so easily possible (uploading files for anyone).
Sorry, I'm a little stumped. I've never used automake. Apparently the autogen.sh script would generate the correct Makefile from the Makefile.am file. I think you either need to figure out why the autogen.sh script didn't run, or else you might try following the instructions that say, "Writing/linking user code without autotools".

#### joshmccraney

Sorry, I'm a little stumped. I've never used automake. Apparently the autogen.sh script would generate the correct Makefile from the Makefile.am file. I think you either need to figure out why the autogen.sh script didn't run, or else you might try following the instructions that say, "Writing/linking user code without autotools".
I appreciate all of your help! Before I continue, I made a little bit of progress: it occurred to me that I could just edit the demo_driver codes, the example codes. So I uninstalled oomph, then reinstalled it manually. During manual installation, there is a step where I am to go to the home directory and execute
Code:
make check -k
, which, as you commented earlier, generates an executable. Before doing this, I modified the example code, and indeed it performed according to my modifications.

However, when I run the
Code:
make check -k
command, oomph performs this on every example code. I've tried googling what the
Code:
-k
option does, but cannot find anything. Do you know if there is a way I can run this command but have it only effect a particular demo code?

#### phyzguy

You can see what the -k option does by just going to the manual. In Linux, the manual for any command is found by typing 'man'. So if you type:

man make

it will tell you the options. What make check does is determined by what's in the Makefile. I suspect it runs all of the various codes, which you don't want to do. So let's say you edited the file called joes_poisson_code.cc. When you type:

make -k

it should make the new executable, which will probably be called joes_poisson_code. You want to run this code and not all of the others. So just type:

./joes_poisson_code

and this should run just that piece of code.

### Want to reply to this thread?

"Running a C++ code from oomph-lib (a CFD software)"