尝试安装Qxt以发送电子邮件时出错

时间:2015-02-25 00:01:21

标签: c++ macos qt makefile libqxt

我需要使用QxtSMTP模块才能通过Qt发送电子邮件。我从here下载了该软件包。根据说明,我做了.configuremake。在make install期间,它抛出了一个错误 - (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

因此我无法安装库。我该如何解决这个问题?

其次,我需要发送电子邮件所需的头文件和库。我不希望 README 文件建议 - 通过配置 Qxt CONFIG 变量。那么我需要链接哪些库?

1 个答案:

答案 0 :(得分:1)

如果您只想发送电子邮件并且不想配置 Qxt CONFIG 变量,为什么不执行以下操作。

src/network/qxtsmtp.hsrc/network/qxtsmtp.cpp文件复制到项目文件夹,并将它们作为现有文件添加到项目中(右键单击您的项目)。现在也对这两个文件依赖于qxt库的所有文件执行此操作。例如,src/network/qxtsmtp.h取决于#include "qxtglobal.h"#include "qxtmailmessage.h"

完成此程序后,连接到smtp服务器并发送短消息。尝试编译并解决问题。

另一种选择可能是使用MailCore。它还包含在MacOS上构建的说明:https://github.com/MailCore/mailcore2/blob/master/build-mac/README.md