Comments (11)
target_link_libraries(projetct PUBLIC ${LINKS})
Is this a typo only here?
from mailio.
not its not even my project name it doesnt matter
from mailio.
You can use the library without CMake. Just include the headers and link it, like any other Unix library. It would go something like:
g++ -std=c++17 -I ./include/ -I /opt/boost-1.75.0/include/ -L ./build/ -L /opt/boost-1.75.0/lib/ -L /usr/lib/x86_64-linux-gnu/ test.cpp -o test -lboost_system -lboost_regex -lboost_date_time -lpthread -lcrypto -lssl -lmailio
where the test.cpp
is your own example. Ensure that the shared library (libmailio.so) is available.
from mailio.
my project is using CMake I cannot not use it
from mailio.
also I am not on linux
from mailio.
Here is an extract from one project which uses Mailio:
cmake_minimum_required (VERSION 3.14)
set(PROJ kama)
project (${PROJ} VERSION 0.2.0)
set (CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(PROJSRC
${PROJECT_SOURCE_DIR}/source/main.cpp
${PROJECT_SOURCE_DIR}/source/configuration.cpp
${PROJECT_SOURCE_DIR}/source/db_model.cpp
${PROJECT_SOURCE_DIR}/source/sender.cpp
${PROJECT_SOURCE_DIR}/source/receiver.cpp
)
set(PROJINC
${PROJECT_SOURCE_DIR}/include/configuration.hpp
${PROJECT_SOURCE_DIR}/include/db_model.hpp
${PROJECT_SOURCE_DIR}/include/sender.hpp
${PROJECT_SOURCE_DIR}/include/receiver.hpp
)
add_definitions(-DBOOST_ALL_DYN_LINK)
find_package(Boost COMPONENTS system thread REQUIRED)
include_directories(${Boost_INCLUDE_DIR})
find_package(Threads REQUIRED)
include_directories(include)
find_package(OpenSSL)
include_directories(${OPENSSL_INCLUDE_DIR})
include_directories(${CMAKE_SOURCE_DIR}/libs/mailio/include)
find_library(MAILIO_LIB mailio HINTS ${CMAKE_SOURCE_DIR}/libs/mailio/build)
add_executable(${PROJ} ${PROJSRC} ${PROJINC})
target_link_libraries(${PROJ} ${Boost_LIBRARIES} Threads::Threads ${OPENSSL_LIBRARIES} ${MAILIO_LIB})
Let me know whether it works, since I have stripped the other libraries used by the project.
from mailio.
still doesnt link
from mailio.
Are you using Windows and MSVC? Did Vcpkg compiled the library into mailio.lib
and mailio.dll
libraries?
from mailio.
Im using g++ and vcpkg compiled them yes, i tried to include those libs in the cmakelist but it still didn't work
from mailio.
If the examples and test compile, then the library should be installed. Since your CMake cannot locate the library, you can turn on the verbose mode and check the execution output.
from mailio.
Cannot be considered as the mailio problem.
from mailio.
Related Issues (20)
- Segmentation fault due to mailio::smtps conn(smtp_server, smtp_server_port); HOT 11
- Question about ranges (imap::messages_range_t) HOT 2
- Segfault in dialog constructor HOT 4
- want to use mailio::message::parse to handle Boost.Beast-powered form file uploads HOT 3
- Missing version.hpp during installation HOT 7
- Add vcpkg manifest support HOT 3
- Problems compiling the example code with CMake HOT 1
- IMAP(Switching to SSL failed.) HOT 2
- IMAP list folder, encoding error ? HOT 12
- Switching to SSL failed HOT 8
- send imap quoted string HOT 9
- imap fetch command response parsing HOT 2
- parsing imap quoted string HOT 2
- segmentation fault in imap fetch function
- parsing imap resp-text
- [Question] Image in the body of the message HOT 10
- Please, could anyone provide me an example of how to get the mail content as a unencoded string? HOT 2
- Is it ok to use `-std=c++17` instead of `-std=gnu++1z` HOT 1
- smtps::connection::submit response HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailio.