|
[Sponsors] | |||||
No such file or directory: #include <features.h> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 | |
|
Member
Join Date: Dec 2020
Posts: 38
Rep Power: 7 ![]() |
Hi,
I want to write a simple code in OpenFoam Code:
// A hello world program in C++
#include<iostream>
using namespace std;
int main()
{
cout << "Hello World!";
return 0;
}
Code:
g++ hello_world.cpp Quote:
Best regards. |
||
|
|
|
||
|
|
|
#2 |
|
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 889
Rep Power: 19 ![]() |
This is a little odd. Did you list the WHOLE of your code?
Code:
// A hello world program in C++
#include<iostream>
using namespace std;
int main()
{
cout << "Hello World!";
return 0;
}
Code:
#include <features.h> |
|
|
|
|
|
|
|
|
#3 |
|
Member
Join Date: Dec 2020
Posts: 38
Rep Power: 7 ![]() |
I shared the whole code. There is not another part.
Last edited by ulugbey; December 30, 2020 at 20:47. |
|
|
|
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 889
Rep Power: 19 ![]() |
Ok - that IS wierd, but a quick google search shows that it's a fairly common problem that's not associated with OpenFOAM - there's something wrong/incomplete with your g++ installation, see e.g.:
https://stackoverflow.com/questions/...ow-do-i-get-it Try checking/reinstalling your g++ installation. Good luck. |
|
|
|
|
|
|
|
|
#5 |
|
Member
Join Date: Dec 2020
Posts: 38
Rep Power: 7 ![]() |
Thanks,
Your suggestion helped to solve the problem. I implemented Code:
sudo apt-get install g++-multilib |
|
|
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Apr 2020
Location: UK
Posts: 889
Rep Power: 19 ![]() |
Great job - well done!
|
|
|
|
|
|
![]() |
| Tags |
| c++, coding, openfoam 1712 |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to calculate mass flow rate on patches and summation of that during the run? | immortality | OpenFOAM Post-Processing | 104 | February 16, 2021 09:46 |
| polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 10:07 |
| centOS 5.6 : paraFoam not working | yossi | OpenFOAM Installation | 2 | October 9, 2013 02:41 |
| OpenFoam install script Error during paraFoam installation | SePe | OpenFOAM Installation | 10 | June 19, 2010 16:15 |
| OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |