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)
- [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
- add_bcc_recipient HOT 8
- Switching to SSL failed HOT 6
- Parsing failure. HOT 8
- Allow formatting of BCC addresses HOT 2
- when parsing the header of this mime crashed! HOT 14
- mailio stop working with vcpkg? HOT 1
- How to handle the inline image in the mime data? HOT 1
- Tests fail to link: ld: error: undefined symbol: main HOT 3
- Tests fail: error: in "format_attachment_utf8": check ... has failed HOT 2
- problem with static library version HOT 3
- error when linking statically HOT 1
- It looks like a problem with the SSL verification. HOT 2
- Problem when linking the "simple smtp message" example with mingw. HOT 3
- Line policy overflow in a header (mime.cpp) HOT 5
- Devivery report is not received, is it normal ? Event I added header for it !!! HOT 1
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.