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

[OpenFOAM.org] Building OpenFOAM 3.0 with C++11 features

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 4, 2015, 08:49
Default Building OpenFOAM 3.0 with C++11 features
  #1
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
I tried to compile it with C++11 which was possible in earlier versions, but it seems that now there is a missing directory, namely wmake/rules/linux64Gcc++0x/. Can anyone elaborate on this?
I'm currently trying to compile it with an older version of this directory. It's still working, but so far it seems to be fine.

Edit: No, getting errors in PStream dummy library relatively early in the compilation procedure:
Code:
+ wmake libso dummy
/home/benutzer/OpenFOAM/OpenFOAM-3.0.x/src/Pstream/dummy
g++ -m64 -std=c++0x -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-100  -IlnInclude -I. -I/home/benutzer/OpenFOAM/OpenFOAM-3.0.x/src/OpenFOAM/lnInclude -I/home/benutzer/OpenFOAM/OpenFOAM-3.0.x/src/OSspecific/POSIX/lnInclude   -fPIC -shared /home/benutzer/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc++0xDPInt32Opt/src/Pstream/dummy/UPstream.o /home/benutzer/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc++0xDPInt32Opt/src/Pstream/dummy/UIPread.o /home/benutzer/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc++0xDPInt32Opt/src/Pstream/dummy/UOPwrite.o -L/home/benutzer/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc++0xDPInt32Opt/lib \
              -o /home/benutzer/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc++0xDPInt32Opt/lib/dummy/libPstream.so
g++: error: /home/benutzer/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc++0xDPInt32Opt/src/Pstream/dummy/UPstream.o: Datei oder Verzeichnis nicht gefunden
g++: error: /home/benutzer/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc++0xDPInt32Opt/src/Pstream/dummy/UIPread.o: Datei oder Verzeichnis nicht gefunden
g++: error: /home/benutzer/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc++0xDPInt32Opt/src/Pstream/dummy/UOPwrite.o: Datei oder Verzeichnis nicht gefunden
g++: fatal error: no input files
compilation terminated.
make: *** [/home/benutzer/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64Gcc++0xDPInt32Opt/lib/dummy/libPstream.so] Fehler 1
Trying to compile with Gcc 5.2 and old C++ standard now.

Next edit: I was able to compile with Gcc 5.2 and the old C++ standard, but C++11 didn't work.

Last edited by chriss85; November 5, 2015 at 04:41.
chriss85 is offline   Reply With Quote

Old   November 8, 2015, 06:07
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
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
Quick question: May I ask why exactly do you want to build with C++11, when C++14 is the support that is provided into OpenFOAM?
I ask this because it might take a considerable amount time to diagnose the problem, therefore I would like to have a good reason to do so

PS: I moved your post from http://www.cfd-online.com/Forums/ope...m-3-0-0-a.html to a new dedicated thread, since the other one is about the news announcement itself.
wyldckat is offline   Reply With Quote

Old   November 9, 2015, 03:56
Default
  #3
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
I needed some newer C++ features for some other code I had integrated and I simply followed the tutorial provided here for C++11: http://www.sourceflux.de/blog/compil...upport-c11c0x/
With prior OpenFOAM versions this was working fine.

Right now I can also work with the old C++ standard, but I will try C++14 sometime I guess.
chriss85 is offline   Reply With Quote

Old   March 26, 2016, 12:57
Default
  #4
Member
 
Join Date: Aug 2015
Posts: 37
Rep Power: 10
knuckles is on a distinguished road
I created another thread to asking whether C++14 is really enabled in OF3.0.1. I think that I have answered my own question (and yours) in the last post: http://www.cfd-online.com/Forums/ope...tml#post591776
knuckles 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
[OpenFOAM.org] OpenFOAM 2.4.0 and Fedora 22: error building CGAL macelee OpenFOAM Installation 4 April 2, 2016 22:01
[OpenFOAM.org] OpenFoam 3.0 installation on Ubuntu 14.04.3 tab2001ng OpenFOAM Installation 3 March 8, 2016 01:38
[OpenFOAM.org] Building OpenFOAM 3.0 on ArchLinux coldice OpenFOAM Installation 8 January 31, 2016 11:39
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 09:04
New OpenFOAM Forum Structure jola OpenFOAM 2 October 19, 2011 06:55


All times are GMT -4. The time now is 17:48.