Skip to content

Commit 5421645

Browse files
Fix multiply defined Error symbols in vtkh_core and vtkh_filters DLLs
Mark inline methods with explicit 'inline' keyword to prevent symbol duplication when both vtkh_core.dll and vtkh_filters.dll export the Error class. This resolves linker error LNK2005 for Error constructor and other inline methods that were being defined in multiple DLLs when both were built with ASCENT_EXPORTS_FLAG. The explicit 'inline' keyword ensures these symbols are properly inlined at compile time and not duplicated across translation units in different DLLs. Fixes Windows build failure: fatal error LNK1169 in vtkh_filters.vcxproj
1 parent eadd232 commit 5421645

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/libs/vtkh/Error.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class VTKH_API Error : public std::exception
1414
std::string m_message;
1515
Error() {}
1616
public:
17-
Error(const std::string message) : m_message(message) {}
18-
const std::string & GetMessage() const { return this->m_message; }
19-
const char * what() const noexcept override { return m_message.c_str(); }
17+
inline Error(const std::string message) : m_message(message) {}
18+
inline const std::string & GetMessage() const { return this->m_message; }
19+
inline const char * what() const noexcept override { return m_message.c_str(); }
2020

2121
};
2222

0 commit comments

Comments
 (0)