[gmime-devel] How to build and use gmime with visual studio express 2008
- From: Jochen De Smet <jochen leahnim org>
- To: gmime-devel-list gnome org
- Subject: [gmime-devel] How to build and use gmime with visual studio express 2008
- Date: Thu, 06 May 2010 00:06:39 -0400
I'm trying to use gmime in a vc++ project I'm working on.
I downloaded the gmime-2.5.1 sources and opened the project under
build/vs2008/gmime.vcproj. Building this project appears to succeed.
It results in a gmime-2.6.lib file under build/vs2008/Debug (but no .dll
as far as I can tell)
Trying to build the first example from the tutorial fails horribly however.
This is the code
#include <stdio.h>
#define ssize_t long
#include <gmime/gmime.h>
int main (int argc, char **argv)
{
GMimeStream *stream;
/* initialize GMime */
g_mime_init (0);
/* create a stream around stdout */
stream = g_mime_stream_file_new (stdout);
/* 'printf' */
g_mime_stream_printf (stream, "Hello World!\n");
/* flush stdout */
g_mime_stream_flush (stream);
/* free/close the stream */
g_object_unref (stream);
return 0;
}
(The ssize_t define isn't in the original example but is needed in vs)
The linker complains about heaps of missing symbols, most of which
appear to be
glib ones (only the first symbol pasted below):
1>gmime-2.6.lib(gmime-stream-cat.obj) : error LNK2001: unresolved
external symbol _g_object_unref
1>gmime-2.6.lib(gmime-data-wrapper.obj) : error LNK2001: unresolved
external symbol _g_object_unref
1>gmime-2.6.lib(gmime-header.obj) : error LNK2019: unresolved external
symbol _g_object_unref referenced in function _g_mime_header_iter_new
1>gmime-2.6.lib(gmime-stream-filter.obj) : error LNK2001: unresolved
external symbol _g_object_unref
1>gmime-2.6.lib(gmime-part.obj) : error LNK2001: unresolved external
symbol _g_object_unref
1>gmime-2.6.lib(internet-address.obj) : error LNK2001: unresolved
external symbol _g_object_unref
1>gmime-2.6.lib(gmime-message.obj) : error LNK2001: unresolved external
symbol _g_object_unref
1>gmime-2.6.lib(gmime-parser.obj) : error LNK2001: unresolved external
symbol _g_object_unref
1>gmime-2.6.lib(gmime-multipart-signed.obj) : error LNK2001: unresolved
external symbol _g_object_unref
1>gmime-2.6.lib(gmime-multipart-encrypted.obj) : error LNK2001:
unresolved external symbol _g_object_unref
1>gmime-2.6.lib(gmime-multipart.obj) : error LNK2001: unresolved
external symbol _g_object_unref
1>gmime-2.6.lib(gmime-object.obj) : error LNK2001: unresolved external
symbol _g_object_unref
1>mimetest.obj : error LNK2001: unresolved external symbol _g_object_unref
1>gmime-2.6.lib(gmime-stream.obj) : error LNK2001: unresolved external
symbol _g_object_unref
1>gmime-2.6.lib(gmime-message-partial.obj) : error LNK2001: unresolved
external symbol _g_object_unref
1>gmime-2.6.lib(gmime-message-part.obj) : error LNK2001: unresolved
external symbol _g_object_unref
The test program is set to link against glib. Any test program that uses
glib but not gmime builds fine.
My glib version is 2.22.4
Any idea what might be causing this and how to solve it ?
J.
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]