Problem in ubuntu 15.04 migration

74 views
Skip to first unread message

Manuel Quinteiro

unread,
Oct 17, 2015, 4:59:05 AM10/17/15
to VMime


Dear All,

Recently I have migrated from ubuntu 14.04 to ubuntu 15.04. Vivid, In vivid there is no official package libvmine0 :( so I decide compile and install by myself.
I follow all instructions, compile and install with:

 cmake -G "Unix Makefiles"  -DVMIME_TLS_SUPPORT_LIB_IS_OPENSSL=ON -DVMIME_TLS_SUPPORT_LIB_IS_GNUTLS=OFF -D
VMIME_BUILD_SAMPLES=OFF; make; sudo make install


cmake finished with "-- Build files have been written to: /home/mquinteiro/vmime"
make and make install don't give error messages.

But....
When I compile my program I'm getting this error:

main.cpp:15:5: error: ‘ref’ is not a member of ‘vmime’
vmime::ref <vmime::defaultAttachment> att;

Before ubuntu upgrade it compiles perfectly.
And for sure I have the includes:
#include <vmime/vmime.hpp>
#include <vmime/platforms/posix/posixHandler.hpp>

Help will be appreciated, thanks
Best regards!



Vincent Richard

unread,
Oct 23, 2015, 7:02:40 AM10/23/15
to VMime
Hi Manuel!

Which version of VMime have you downloaded?

I suggest you to get the latest version from the Git:
https://github.com/kisli/vmime

Also, "vmime::ref" is deprecated, you should use "vmime::shared_ptr" instead.
Either standard C++11' shared pointers or Boost' ones are now used, depending on what is found on the system.

Cheers,

Vincent

Manuel Quinteiro

unread,
Oct 25, 2015, 7:04:44 PM10/25/15
to VMime
Thanks Vincent, 
That was one of my problems, I was using code from 0.8 with the last git version.
I have change some things like ref for share_ptr, create --> make_shared.

Also replace vmime::platformDependant to vmime::platform but I think that now is unneeded .

But I have problem with attachments, every time I try to create an attach I get an "Error opening file" exception, even with this code:
vmime::shared_ptr<vmime::fileAttachment> att = vmime::make_shared <vmime::fileAttachment>(
__FILE__,
 vmime
::mediaType("application/octet-stream"), // content type
 vmime
::text("cpp file")
 
);




I'm lost!

Thanks again!

Manuel Quinteiro

unread,
Oct 30, 2015, 12:00:33 PM10/30/15
to VMime
The solution for my problem is to put full path in fileAttachment. 

class fileAttachment needs a full path from / it is not allow ./filename or just filename.

Thanks.


Reply all
Reply to author
Forward
0 new messages