using cygwin

Dear friends,

I want to compile Openlb with cygwin, does anyone use cygwin for compiling it?
how can i compile it with cygwin?

can i compile Openlb in Linux Ubuntu?

We frequently compile OpenLB with both Cygwin and Ubuntu Linux. There’s nothing to be worried about; simply follow the steps in the user’s guide. There’s one caveat though: on some Cygwin/Processor combinations, the optimization flag -O3 produces erroneous code. Use -O2 instead.

You should be careful about the version of g++ is installed in your version of cygwin. You may have to update it…

thanks very much, jlatt, malaspin.
I use this procedure and can not compile it!

1-Opening the cygwin
2-going to openlb directory [in my computer at D drive]
3- using make command
4- going to examples/cavity2d directory
5- using make
6- cygwin has made (.tmpfile[TMPFILE File],cylinder2d[D source file], cylinder2d[application], cylinder2d.o[O file]) files and no error
7- Doudle click on cilinder2d[application].
8- "This application has failed to start because cygwin1.dll was not found. Re-intalling the application may fix this problem.

  • I try to use {gcc cylinder2d.cpp -o cylinder2d.exe}, but many errors appeared in compiling process

  • I compile 2 other CPP files with my cygwin Program. thats work.

can u help me please?

another question:
Can anyone compile it with CodeBlocks?

I can’t compile.


My interpretation of your description is that the compilation of OpenLB was successful, but that you can’t run it because the Cygwin installation is flawed. What happens if you execute cyilinder2D.exe from the Cygwin shell, instead of double-clicking the program from the Windows interface?

Here’s somebody who was successful with Code::Blocks after a small modification in the OpenLB source code:,815,815#msg-815

Hi, Thanks a lot for your reply
when i type cylinder2d in Cygwin command line, it say:
"bash: cylinder2d: command not "

I instal Cygwin from internet, and select all of the packages in Devel category. Other categry’s setting has been Default.

could yo tell me configuration of your Cygwin?

in compliling with cygwin, should I change the Makefile?
I don’t change it.


No, no need to change the Makefile. Is it that the executable produced by g++ is called cylinder2d.exe for Windows compatibility? That would mean that after cd’ing into the right directory you should type ./cylinder2d.exe .

Dear Dr. Latt!

Thank you very much.
we must use ./cylinder2d
It is work !


Hello everybody,

I have a question regarding how to use cygwin for compiling OpenLB. Here are the steps I used to compile the code:

  1. I downloaded and extracted the OpenLB software onto a subfolder of my desktop’s F drive.
  2. Opened cygwin
  3. $cd /cygdrive/f/…/OpenLB/ (This folder contains src and examples folders along with Makefile and
  4. In the OpenLB folder, I typed $ make (this gives me the error:- bash: make: command not found)
  5. Then I tried $./Makefile (this gives me several errors, one each for the commands ROOT, SRC, OUTPUT etc that are used in the Makefile)
  6. I tried going into the examples/cylinder2d folder and did the same. But I got the same errors as before.

Could you’ll please tell me how I can compile the OpenLB code for, say, the cylinder2d example?

Thank you.

It appears that the command “make” does not work in your Cygwin installation. Try the Cygwin forum toubleshoot this issue.

Thank you Dr. Latt. I am currently running the cylinder2d case after installing a few more components in cygwin.