Hi,
Have you been able to backtrace the segfault?
Running this code:
#include <fstream>
#include <iostream>
#include <vmime/vmime.hpp>
int main()
{
// Read data from f i l e
std::ifstream file;
file.open("hello.eml", std::ios::in | std::ios::binary);
vmime::utility::inputStreamAdapter is(file);
vmime::string data;
vmime::utility::outputStreamStringAdapter os(data);
vmime::utility::bufferedStreamCopy(is, os);
// Actually parse the message
vmime::ref<vmime::message> msg = vmime::create<vmime::message>();
msg->parse(data);
vmime::ref<vmime::header> hdr = msg->getHeader();
vmime::ref<vmime::body> bdy = msg->getBody();
vmime::charset ch(vmime::charsets::UTF_8);
std::cout << "Subject: " <<
hdr->Subject()->getValue().dynamicCast<vmime::text>()->getConvertedText(ch)
<< std::endl;
}
=== EOF ===
with hello.eml:
Date: Thu, Oct 13 2005 15:22:46 +0200
From: Vincent <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Hello from VMime!
A simple message to test VMime
=== EOF ===
works for me, without a segfault.
Does the above code work for you?
Regards,
--
Mattias Nordstrom
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]