Header files

Can someone give links of header files? At this point I need <CkMailMan.h> <CkEmail.h>
That doesn't make sense. Headers are only half of what you need.

google tells that it is part of this:

https://www.chilkatsoft.com/

which is not free.

So I suggest that you use a free library like POCO:

http://pocoproject.org/

Notice that sending email means you need authentication (user name / password) most of the time.
http://axistasoft.com/blog/poco/poco-net/item/sending-email-messages-using-poco-smtpclientsession-class Ok I use this source of poco but I got error: fatal error: Poco/Foundation.h: No such file or directory jumped in the new tab called Net.h. So I hadn't foundation.h, where to get it? It isn't included in poco.

can you help me?
Last edited on
It is included in poco. Just the organization of the header files is a bit strange.

You find it in

the_base_path_of_poco\poco\Foundation\include\Poco

You need to add the include path (without the last 'Poco' because that's in the #include) in your project setting.


For instance the header "SMTPClientSession.h" you will find in

the_base_path_of_poco\poco\Net\include\Poco\Net
Last edited on
Ok you helped me a littlebit. Thanks. I noticed it and I linked manually headers that code blocks couldn't find. It means I'm moving foward. Now I encountered with:

D:/Misc/Documents/C++/Projects/Poco email/main.cpp:50: undefined reference to `Poco::Net::MailMessage::encodeWord(std::string const&, std::string const&)'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:52: undefined reference to `Poco::Net::MailMessage::MailMessage(Poco::Net::PartStoreFactory*)'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:53: undefined reference to `Poco::Net::MailMessage::setSender(std::string const&)'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:54: undefined reference to `Poco::Net::MailRecipient::MailRecipient(Poco::Net::MailRecipient::RecipientType, std::string const&)'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:54: undefined reference to `Poco::Net::MailMessage::addRecipient(Poco::Net::MailRecipient const&)'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:54: undefined reference to `Poco::Net::MailRecipient::~MailRecipient()'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:55: undefined reference to `Poco::Net::MailMessage::setSubject(std::string const&)'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:56: undefined reference to `Poco::Net::MailMessage::setContentType(std::string const&)'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:57: undefined reference to `Poco::Net::MailMessage::setContent(std::string const&, Poco::Net::MailMessage::ContentTransferEncoding)'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:59: undefined reference to `Poco::Net::SMTPClientSession::SMTPClientSession(std::string const&, unsigned short)'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:60: undefined reference to `Poco::Net::SMTPClientSession::open()'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:62: undefined reference to `Poco::Net::SMTPClientSession::login(Poco::Net::SMTPClientSession::LoginMethod, std::string const&, std::string const&)'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:63: undefined reference to `Poco::Net::SMTPClientSession::sendMessage(Poco::Net::MailMessage const&)'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:65: undefined reference to `Poco::Net::SMTPClientSession::close()'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:65: undefined reference to `Poco::Net::SMTPClientSession::~SMTPClientSession()'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:52: undefined reference to `Poco::Net::MailMessage::~MailMessage()'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:54: undefined reference to `Poco::Net::MailRecipient::~MailRecipient()'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:67: undefined reference to `Poco::Exception::displayText() const'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:68: undefined reference to `Poco::Net::SMTPClientSession::close()'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:70: undefined reference to `Poco::Net::SMTPClientSession::~SMTPClientSession()'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:72: undefined reference to `Poco::Exception::displayText() const'
D:/Misc/Documents/C++/Projects/Poco email/main.cpp:52: undefined reference to `Poco::Net::MailMessage::~MailMessage()'
obj\Debug\main.o: In function `ZNK4Poco3Net4Impl21IPv4SocketAddressImpl4hostEv':
C:/poco-1.7.3-all/Net/include/Poco/Net/SocketAddressImpl.h:88: undefined reference to `Poco::Net::IPAddress::IPAddress(void const*, int)'
obj\Debug\main.o: In function `ZNK4Poco3Net4Impl21IPv6SocketAddressImpl4hostEv':
C:/poco-1.7.3-all/Net/include/Poco/Net/SocketAddressImpl.h:149: undefined reference to `Poco::Net::IPAddress::IPAddress(void const*, int, unsigned int)'
obj\Debug\main.o: In function `ZN4Poco3Net4Impl21IPv6SocketAddressImplD1Ev':
C:/poco-1.7.3-all/Net/include/Poco/Net/SocketAddressImpl.h:119: undefined reference to `Poco::Net::Impl::SocketAddressImpl::~SocketAddressImpl()'
obj\Debug\main.o: In function `ZN4Poco3Net4Impl21IPv4SocketAddressImplD1Ev':
C:/poco-1.7.3-all/Net/include/Poco/Net/SocketAddressImpl.h:58: undefined reference to `Poco::Net::Impl::SocketAddressImpl::~SocketAddressImpl()'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
27 error(s), 0 warning(s) (0 minute(s), 1 second(s))


I think I need to link libraries but where to get it? I didn't find any a. lib. or etc. files in the poco libraries.



I think I need to link libraries but where to get it?
You need to build the libraries first. There is a good documantion on the POCO site. See:

http://pocoproject.org/docs/00200-GettingStarted.html



I noticed it and I linked manually headers that code blocks couldn't find.
I don't know what that means. You need to add

the_base_path_of_poco\poco\Foundation\include

to your project include path and all headers are found according to this.
I don't know what that means. You need to add

the_base_path_of_poco\poco\Foundation\include

to your project include path and all headers are found according to this.


C:\poco-1.7.3-all\the_base_path_of_poco\poco\Foundation\include http://imgur.com/Xn8TCyr
as you see now I added but it's not working.

You need to build the libraries first. There is a good documantion on the POCO site. See:

http://pocoproject.org/docs/00200-GettingStarted.html


I have no idea how to build libraries in Code Blocks. If you don't know how to do that in CB so give me full instruction how to build it in IDE you use and of course how to link headers like that
the_base_path_of_poco\poco\Foundation\include
.
Last edited on
Topic archived. No new replies allowed.