Skip to content

Conversation

@c1ydehhx
Copy link
Member

Fix: #94

@c1ydehhx c1ydehhx added the enhancement New feature or request label Jun 16, 2024
@c1ydehhx c1ydehhx self-assigned this Jun 16, 2024
@c1ydehhx c1ydehhx requested review from NOOBDY and ntut-rick June 16, 2024 21:48
@sonarqubecloud

This comment was marked as resolved.

@github-actions

This comment was marked as resolved.

Copy link
Member

@NOOBDY NOOBDY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk if this is really necessary but Util::Text probably needs the same change

@c1ydehhx
Copy link
Member Author

idk if this is really necessary but Util::Text probably needs the same change

I'll check and take back for you.

Copy link
Member

@Dragonfly911117 Dragonfly911117 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to merge upstream/main again. Both *GetMissingFontTextureSDLSurface() and *GetMissingImageTextureSDLSurface() have lost the Util namespace, leading to undefined references.

diff --git a/include/Util/MissingTexture.hpp b/include/Util/MissingTexture.hpp
index ea9e354..29ab966 100644
--- a/include/Util/MissingTexture.hpp
+++ b/include/Util/MissingTexture.hpp
@@ -21,9 +21,7 @@ static constexpr auto MISSING_IMAGE_TEXTURE_BASE64_DECODE =
     DecodeBase64<MISSING_IMAGE_TEXTURE_BASE64_DECODE_LENGTH>(
         MISSING_IMAGE_TEXTURE);
 
-namespace Util {
 SDL_Surface *GetMissingFontTextureSDLSurface();
 SDL_Surface *GetMissingImageTextureSDLSurface();
-} // namespace Util
 
 #endif
C:/Users/df/CLionProjects/PTSD/src/Util/Image.cpp:19: undefined reference to `GetMissingImageTextureSDLSurface()'
C:\Users\df\AppData\Local\Programs\CLion\bin\mingw\bin/ld.exe: libPTSD.a(Image.cpp.obj): in function `Util::Image::Image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
C:/Users/df/CLionProjects/PTSD/src/Util/Image.cpp:45: undefined reference to `GetMissingImageTextureSDLSurface()'
C:\Users\df\AppData\Local\Programs\CLion\bin\mingw\bin/ld.exe: libPTSD.a(Text.cpp.obj): in function `Util::Text::Text(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Util::Color const&)':
C:/Users/df/CLionProjects/PTSD/src/Util/Text.cpp:33: undefined reference to `GetMissingFontTextureSDLSurface()'
C:\Users\df\AppData\Local\Programs\CLion\bin\mingw\bin/ld.exe: libPTSD.a(Text.cpp.obj): in function `Util::Text::ApplyTexture()':
C:/Users/df/CLionProjects/PTSD/src/Util/Text.cpp:112: undefined reference to `GetMissingFontTextureSDLSurface()'
collect2.exe: error: ld returned 1 exit status```
![image](https://github.com/user-attachments/assets/5ae53c65-7dd7-47d9-93a5-e668b112ae51)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: 📋 Todo

Development

Successfully merging this pull request may close these issues.

名不符實 in static functions of Util::Image class

3 participants