Fixed an error that occurred during linking of applications.
There were multiple definitions of importPhase(string, string), one per application file. I moved the definition of importPhase to libctxx.a as it had to be in an object file, and I retained the declaration within importPhase.h. I also added declarations for the other functions in libctxx.a into importPhase.h, as they weren't declared anywhere in the interface.
This commit is contained in:
parent
82db8d7914
commit
910a2abf86
3 changed files with 12 additions and 9 deletions
|
|
@ -6,12 +6,15 @@
|
|||
#include "kernel/ThermoPhase.h"
|
||||
#include "kernel/ThermoFactory.h"
|
||||
|
||||
/*
|
||||
* The Definitions for these functions are all located in
|
||||
* libctxx.a
|
||||
*/
|
||||
namespace Cantera {
|
||||
ThermoPhase* importPhase(std::string infile, std::string id="");
|
||||
|
||||
ThermoPhase* importPhase(std::string infile, std::string id="") {
|
||||
ThermoPhase* p = newPhase(infile, id);
|
||||
return p;
|
||||
}
|
||||
std::string report(const ThermoPhase& th, bool show_thermo);
|
||||
std::string formatCompList(const Phase& mix, int xyc);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ SUFFIXES= .cpp .d .o
|
|||
PIC_FLAG=@PIC@
|
||||
CXX_FLAGS = @CXXFLAGS@ $(CXX_OPT) $(PIC_FLAG)
|
||||
|
||||
OBJS = cxxutils.o
|
||||
OBJS = cxxutils.o importPhase.o
|
||||
|
||||
DEPENDS = $(OBJS:.o=.d)
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Cantera {
|
|||
/**
|
||||
* Format a summary of the mixture state for output.
|
||||
*/
|
||||
string report(const ThermoPhase& th, bool show_thermo) {
|
||||
std::string report(const ThermoPhase& th, bool show_thermo) {
|
||||
|
||||
try {
|
||||
char p[200];
|
||||
|
|
@ -76,19 +76,19 @@ namespace Cantera {
|
|||
return s;
|
||||
}
|
||||
catch (CanteraError) {
|
||||
return string("<error>");
|
||||
return std::string("<error>");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Format a composition list for output.
|
||||
*/
|
||||
string formatCompList(const Phase& mix, int xyc) {
|
||||
std::string formatCompList(const Phase& mix, int xyc) {
|
||||
|
||||
const doublereal Threshold = 1.e-20;
|
||||
|
||||
char p[200];
|
||||
string s = "";
|
||||
std::string s = "";
|
||||
int kk = mix.nSpecies();
|
||||
array_fp zz(kk);
|
||||
switch (xyc) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue