问题
I need to use the QxtSMTP
module to be able to send email through Qt. I downloaded the package from here. As per the instructions, I did .configure
and make
. During make install
, it threw an error - (OS X, 10.10)
/Users/Cupidvogel/Desktop/mail/libqxt-master/src/core/qxtglobal.cpp:201: Undocumented parameter 'PUB' in QXT_P()
/Users/Cupidvogel/Desktop/mail/libqxt-master/src/core/qxtglobal.cpp:201: No such parameter 'QXT_DECLARE_PUBLIC' in QXT_P()
qdoc3(31442,0x7fff79948300) malloc: *** error for object 0x1109c1a40: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
/bin/sh: line 1: 31442 Abort trap: 6 ( QXT_SOURCE_TREE=/Users/Cupidvogel/Desktop/mail/libqxt-master QXT_BUILD_TREE=/Users/Cupidvogel/Desktop/mail/libqxt-master /Users/Cupidvogel/Desktop/mail/libqxt-master/tools/3rdparty/qdoc3/qdoc3 -DQXT_DOXYGEN_RUN /Users/Cupidvogel/Desktop/mail/libqxt-master/doc/src/qxt.qdocconf )
make: *** [adp_docs] Error 134
As a result of which I am unable to get the libraries installed. How do I fix this?
And secondly, I need the header files and libraries required to send email. I don't want to do it the README file suggests - by configuring Qxt and CONFIG variables. So which libraries do I need to link?
回答1:
If you only want to send email and don't want to configure Qxt and CONFIG variables, why not do the following.
Copy the src/network/qxtsmtp.h
and src/network/qxtsmtp.cpp
files to your project folder and add them as existing files to your project (right click on your project). Now also do this for all files that these 2 files depend on for the qxt library. In example, src/network/qxtsmtp.h
depends on #include "qxtglobal.h"
and #include "qxtmailmessage.h"
.
Once you've done this program the connect to the smtp server and send a short message. Try to compile this and fix the issues.
Another option could be to use MailCore. It also has instructions to build on MacOS: https://github.com/MailCore/mailcore2/blob/master/build-mac/README.md
来源:https://stackoverflow.com/questions/28708747/error-trying-to-install-qxt-for-sending-email