Skip to content

Commit

Permalink
[Fortran] Fix for multiple definitions of '_xml' function
Browse files Browse the repository at this point in the history
This was causing linker errors when trying to link with the Fortran library.
  • Loading branch information
speth committed Feb 24, 2016
1 parent 1183479 commit f0e6d09
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/fortran/fct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ typedef Cabinet<Transport> TransportCabinet;

typedef integer status_t;

namespace {

XML_Node* _xml(const integer* n)
{
return &XmlCabinet::item(*n);
Expand All @@ -51,6 +53,8 @@ Transport* _ftrans(const integer* n)
return &TransportCabinet::item(*n);
}

} // unnamed namespace

std::string f2string(const char* s, ftnlen n)
{
int k;
Expand Down
4 changes: 4 additions & 0 deletions src/fortran/fctxml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ template<> XmlCabinet* XmlCabinet::s_storage = 0;

typedef integer status_t;

namespace {

XML_Node* _xml(const integer* i)
{
return &XmlCabinet::item(*i);
}

} // unnamed namespace

std::string f2string(const char* s, ftnlen n);

extern "C" {
Expand Down

0 comments on commit f0e6d09

Please sign in to comment.