Coder Social home page Coder Social logo

Comments (6)

karastojko avatar karastojko commented on May 29, 2024

Assuming that Boost and OpenSSL are correctly installed, here is the command from the Developer Command Prompt for VS which I use:

c:\mailio\build>c:\Bin\cmake-3.17.3\bin\cmake.exe -DBOOST_ROOT=c:\Install\boost_1_71_0 -DOPENSSL_ROOT_DIR=c:\bin\OpenSSL-Win64 ..

The mailio.sln file is generated which can be opened from VS to build the solution.

from mailio.

joshorenberg avatar joshorenberg commented on May 29, 2024

Awesome thanks karastojko. I used Visual Studio CMake and the Visual Studio IDE and was able to build the project successfully. I scrapped using Qt Creator for the build it was more trouble than it's worth. I'm using Qt Creator however for my project and might switch some other time but not now. It shouldn't be a problem to use it with your libraries and code right? Right now I am getting undeclared identifier for message msg in the smtps_simple_msg.cpp example. When I try to build I get:

C:\Users\Josh\Documents\program stuff\mailio\include\mailio\message.hpp:29: error: C1083: Cannot open include file: 'boost/date_time.hpp': No such file or directory

for the line

#include <boost/date_time.hpp>

I tried manually fixing things but there's got to be something I'm doing wrong. For some reason it's not pointing to the boost headers. Any ideas why that might be? Thanks!

from mailio.

joshorenberg avatar joshorenberg commented on May 29, 2024

Actually got a little further, added INCLUDEPATH += C:\boost_1_80_0 to the Qt project file. Then had to add INCLUDEPATH += "C:\Users\Josh\Documents\program stuff\mailio". Then I had to put

#include <mailio/include/mailio/message.hpp>
#include <mailio/include/mailio/smtp.hpp>
using mailio::message;
using mailio::mail_address;
using mailio::smtps;
using mailio::smtp_error;
using mailio::dialog_error;
using std::cout;
using std::endl;

before including windows.h in another part of my program some silly error from order of include statements. I was getting this error before changing the order of includes:
C:\boost_1_80_0\boost\asio\detail\socket_types.hpp:24: error: C1189: #error: WinSock.h has already been included

from mailio.

joshorenberg avatar joshorenberg commented on May 29, 2024

I am stuck at another point in the code. I used #define WIN32_LEAN_AND_MEAN to fix the Winsock.h already included error however I still get the error. I also tried including the mailio libraries before windows.h to fix the error as well. See here for more about the error. Before it occurred 5 times, after these modifications it occurs once. I include windows.h 4 times in my code so I think the cause of the error comes from somewhere outside of my code. You don't use the Win API at all in your library do you? I think there might be a redundant include somewhere in your code causing the error. Can you try on your end? I'll try using Visual Studio for the smtps_simple_msg.cpp example project when I have time it's just not working right now. I'm using the code straight out of smtps_simple_msg.cpp example. Thanks for the help :) I'm so close I can feel it.

from mailio.

karastojko avatar karastojko commented on May 29, 2024

mailio does not use WinAPI directly but Boost.Asio definitely uses it. I do not use Qt Creator now, but I did in the past on Linux and I had no problems with Gcc. Do you use MinGW or MSVC together with Qt Creator?

from mailio.

joshorenberg avatar joshorenberg commented on May 29, 2024

I am using MSVC 2019. I can create a project from scratch with your sample code when I have time but not sure when that would be...

from mailio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.