Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8373989

Browse files
committed
Add an explicit initializer to std::stringstream.
When compiling with -fvisibility=hidden, a non-explicit initialization seems to produce an implicit constructor, or at least one that is not available in older libstdc++. When mixing a newer native compiler with an older libstdc++ (such as in a conda environment), this causes the library to fail to load from missing symbols.
1 parent 4cec73f commit 8373989

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ft2font.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
FT_Library _ft2Library;
4444

4545
void throw_ft_error(std::string message, FT_Error error) {
46-
std::ostringstream os;
46+
std::ostringstream os("");
4747
os << message << " (error code 0x" << std::hex << error << ")";
4848
throw std::runtime_error(os.str());
4949
}

0 commit comments

Comments
 (0)