|
[Sponsors] |
April 8, 2014, 19:06 |
error in compile lib
|
#1 |
Member
sajad
Join Date: Aug 2013
Posts: 71
Rep Power: 13 |
dear foamer
I wanna compile two lib but I see this error. do you have aye Idea: Code:
[MeNo-OF:2.2.1 Opt] sajad@sajad-K55VD:~/OpenFOAM/sajad-2.2.1/src$ ./Allwmake+ wmake libso incompressible SOURCE=incompressibleTwoPhaseThermalMixture/twoPhaseThermalMixture.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam221/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam221/src/OpenFOAM/lnInclude -I/opt/openfoam221/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/twoPhaseThermalMixture.o In file included from incompressibleTwoPhaseThermalMixture/twoPhaseThermalMixture.C:33:0: incompressibleTwoPhaseThermalMixture/twoPhaseThermalMixture.H:47:74: fatal error: incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H: No such file or directory compilation terminated. make: *** [Make/linux64GccDPOpt/twoPhaseThermalMixture.o] Error 1 [MeNo-OF:2.2.1 Opt] sajad@sajad-K55VD:~/OpenFOAM/sajad-2.2.1/src$ best regards Sajad |
|
April 8, 2014, 22:51 |
|
#2 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 13 |
Dear Sajad,
At first look, it seems like you're going to have a couple of problems. To solve your current error, you need to provide the file it's looking for. However, it's actually just looking for the wrong file - change your line 47 in twoPhaseThermalMixture.H to include "twoPhaseMixture" and you should get past that error. The 'local' version will be taken instead of the version held in the OpenFOAM-x.x.x/src/transportProperties/twoPhaseMixture/ directory. However, doing this then opens up a whole host of new errors. Of immediate concern is that your class is named "twoPhaseThermalMixture" and according to your twoPhaseThermalMixture.H file, inherits publicly from itself. I imagine you wanted your class to inherit from twoPhaseMixture? Next, it seems like you're going to design subclasses due to your virtual functions. If you want to keep the ability to redefine your functions in derived classes, you'll need these virtual functions (eg virtual void correct() ) but if this is the lowest you're going to go, you can have concrete (normal) functions, I think. In either case, you're likely to want a virtual destructor I'm not sure what your twoPhaseMixture::correct is supposed to refer to - your twoPhaseMixture.{C,H} files have no mention of a correct data member (which is clearly not what you want anyway, but whatever...) or a correct() function (which I suspect is what you want). You're going to need to change this code to either find a correct function, or to include one in your class separately. I'm not totally sure, but I think you're going to need to rethink your constructor and/or inheritance, because lots of your functions seem to require data members you don't have. Once you've gotten all the files included (via the first steps above) you'll be able to see a lot more errors and work through them though, with wmake libso. Let me know if you have any questions Best, Christian |
|
April 9, 2014, 03:35 |
|
#3 | |
Member
sajad
Join Date: Aug 2013
Posts: 71
Rep Power: 13 |
Quote:
thank you so much for reply. I found this lib and solver from this link: HTML Code:
http://www.cfd-online.com/Forums/openfoam-solving/69103-diverging-result-temperature-field-interfoam-2.html I see above error. I attached solver here. nub 1 is solver and num 2 is lib I dont no how can I compile that. best regards; |
||
April 9, 2014, 03:47 |
|
#4 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 13 |
Ok, so this is separate from the problems you initially had?
It looks as though (from the other thread) the first library you uploaded to the first post here was the first attempt in the other thread, and that the two uploads in your last post are the new library and new solver. If this is so, what problems are you having? I read your posts to the other thread on the last page, but you referenced a post #53, which I think was the person providing the solver/library/help, Ovie, telling someone he would email help, so I don't know what problem you are having. I will download the library and solver now and see if they work for me. I'm afraid I don't have an OF-2.2.1 installation anymore, but I can test it in both 2.2.2 and 2.3.0. I'll get back to you here shortly. |
|
April 9, 2014, 04:05 |
|
#5 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 13 |
It looks like what you have is a derived class, "twoPhaseThermalMixture", and what you also need is the parent class, which will be required to compile the library. I thought that this was the "twoPhaseMixture.C, H" files, but they provide only a very brief collection of functions. You need to get hold of wherever the rest of the class hierarchy is, and then also include that in your list of files to compile (probably with #includes in your .C files to relevant other headers, as well).
Good luck reading through the other thread, hopefully the clues are there? Let me know if you find the relevant other files and are still having troubles, Best, Christian |
|
April 9, 2014, 04:12 |
|
#6 | |
Member
sajad
Join Date: Aug 2013
Posts: 71
Rep Power: 13 |
Quote:
I want compile and solver and lib at frist I add make into the lib folder and I try compile that. I dont know its correct? after try for compile the lib I saw above error and I confused. best regard |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ATTN ALL: SOLUTON TO UDF COMPILE PROBLEM | Rizwan | Fluent UDF and Scheme Programming | 40 | March 18, 2018 07:05 |
Gmsh installation on terminal help | spitfire | Main CFD Forum | 4 | July 27, 2017 16:11 |
Compile a single lib with different flags | rztim | OpenFOAM Installation | 2 | November 23, 2011 04:42 |
PV3FoamReader compile error.... | PEM_GUY | OpenFOAM Installation | 6 | April 5, 2010 18:22 |
Can someone PLEASE document the development version installation | bernd | OpenFOAM Installation | 76 | November 14, 2008 22:51 |