|
[Sponsors] |
April 8, 2022, 03:39 |
Compile my own c++ class
|
#1 |
New Member
Zhang Yan
Join Date: Nov 2021
Posts: 15
Rep Power: 4 |
Hi, Foamers!
I'm using openFoam v2106 to program my own solver. For convenience, I write a new C++ class. My problem: when I complie the new class alone, it works and corresponding file libIBSystem.so has been created successfully. However, when I complie the whole solver project(the solver's main file .C and new class .C), it doesn't work. I think my options file is not appropriate, but I don't know how to modify it. If someone can help me, I will be very grateful. Thank you! This is my options files (my new class name: IBSystem): Code:
EXE_INC = \ -IIBSystem/lnInclude //Added: doesn't work -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) -lIBSystem \ //Added: works -lfiniteVolume \ -lmeshTools Code:
Make/linux64GccDPInt32Opt/options:60: *** missing separator. Stop. Make/linux64GccDPInt32Opt/options:60: *** missing separator. Stop. wmake error: file 'Make/linux64GccDPInt32Opt/sourceFiles' could not be created in /home/dyfluid/Desktop/immersedBoundary http://www.tfd.chalmers.se/~hani/kur...InOpenFOAM.pdf |
|
April 8, 2022, 04:17 |
|
#2 |
Member
Join Date: Feb 2020
Posts: 90
Rep Power: 6 |
Aren't you missing a backslash?
|
|
April 8, 2022, 04:37 |
|
#3 |
New Member
Zhang Yan
Join Date: Nov 2021
Posts: 15
Rep Power: 4 |
||
April 8, 2022, 11:51 |
|
#4 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40 |
Quote:
Backslash with a newline means a line continuation when using pre-processing macros. Be certain that you do not have something like "backslash spaces newline" - this will not work! |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[waves2Foam] Compile waves2FoamMooring on OF1912 | romainping | OpenFOAM Community Contributions | 5 | October 11, 2021 16:52 |
GeometricField -> mesh() Function | Tobi | OpenFOAM Programming & Development | 10 | November 19, 2020 11:33 |
Adding new class, how to compile it? | aman_baig | SU2 | 3 | January 23, 2020 19:03 |
PV3FoamReader compile error.... | PEM_GUY | OpenFOAM Installation | 6 | April 5, 2010 17:22 |
Expanding a class | fabianpk | OpenFOAM | 0 | October 3, 2005 04:26 |