Extra import symbol in debug build
Xi Ruoyao
xry111@xry111.site
Fri Feb 17 10:23:35 GMT 2023
On Fri, 2023-02-17 at 08:51 +0000, i.nixman--- via Gcc-help wrote:
> 1. will the problem be solved by "pushing" a debug version of libstdc++
> on the remote machine?
Yes if you set LD_LIBRARY_PATH or something correctly. But
-static-libstdc++ is easier.
> 2. how can I define this symbol in the project code for debug build to
> avoid having to use the debug version of libstdc++?
> something like this? :
> namespace std {
> template basic_ios<char, char_traits<char> >::operator bool() const;
> }
You can't. Defining anything in std namespace is undefined behavior.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
More information about the Gcc-help
mailing list