karastojko / mailio

mailio is a cross platform C++ library for MIME format and SMTP, POP3 and IMAP protocols. It is based on standard C++ 17 and Boost library.
Other
372 stars 98 forks source link

Incomplete type ‘mailio::codec’ #171

Closed xavierventuraaimsun closed 1 month ago

xavierventuraaimsun commented 1 month ago

On Ubuntu 22.04 I am getting this error when compiling the project:

[  6%] Building CXX object CMakeFiles/mailio.dir/src/base64.cpp.o
In file included from /root/tmp/mailio/include/mailio/base64.hpp:23,
                 from /root/tmp/mailio/src/base64.cpp:16:
/root/tmp/mailio/include/mailio/codec.hpp:78:71: error: incomplete type ‘mailio::codec’ used in nested name specifier
   78 |     String(const Buf& buffer_s, const std::string& charset_s = codec::CHARSET_ASCII) : buffer(buffer_s), charset(boost::to_upper_copy(charset_s))
      |                                                                       ^~~~~~~~~~~~~
/root/tmp/mailio/include/mailio/codec.hpp: In constructor ‘mailio::String<Buf, Char>::String()’:
/root/tmp/mailio/include/mailio/codec.hpp:54:41: error: incomplete type ‘mailio::codec’ used in nested name specifier
   54 |     String() : buffer(), charset(codec::CHARSET_ASCII)
      |                                         ^~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/mailio.dir/build.make:76: CMakeFiles/mailio.dir/src/base64.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/mailio.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
karastojko commented 1 month ago

Please try the latest commit. Sorry for the problem, I compiled the small change only with Visual Studio which did not complain.

xavierventuraaimsun commented 1 month ago

Yes, it compiles with your latest commit. Thank you!

Fixed with commit da0a97e63b7a8ab3c81154d04eadbb5709e51456