building libetpan for windows
"chris harward" <[email protected]> Mon, 3 Apr 2006 16:51:11 +1000
| Newsgroups | gmane.mail.libetpan.user |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I'm trying to build libetpan for my windows app, I've tried using .NET 2005
and 2003. It compiles okay, but I find that some of the functions mentioned
in the docs (such as mailfolder_get_messages_list) are not in the .lib
produced (I get a LNK2001 error when I try to link to them). For instance
the following code gives an error for the mailfolder_get_messages_list
function call, but none of the others cause an error. Does anyone know what
I might have done wrong?
struct mailstorage *storage = mailstorage_new(NULL);
struct mailfolder *folder;
struct mailmessage_list *msg_list;
imap_mailstorage_init(storage, "myserver.name.com", 0,
NULL, CONNECTION_TYPE_PLAIN, IMAP_AUTH_TYPE_PLAIN,
"user.name", "pswd", 0, 0);
mailstorage_connect(storage);
folder = mailfolder_new(storage, "INBOX", NULL);
mailfolder_connect(folder);
mailfolder_get_messages_list(folder, &msg_list);
m_listBox.InsertString(2, (LPCTSTR)"contents of mailbox user.name:");
int count = carray_count(msg_list->msg_tab) + 3;
for (int i = 3; i < count; i++)
{
mailmessage *msg = (mailmessage*)carray_get(msg_list->msg_tab, i);
char *res;
size_t x;
mailmessage_fetch_header(msg, &res, &x);
m_listBox.InsertString(i, (LPCTSTR)res);
}
UpdateData();
mailmessage_list_free(msg_list);
mailfolder_disconnect(folder);
mailstorage_disconnect(storage);
mailstorage_free(storage);