Похожие чаты

Hey, could someone help me understand how I can link

a third party library using cmake? In my case I'm trying to link asio with my project. I found some solutions online. One is adding the library into my project as a standalone library (I like that solution but still using the snippets I found online I can't yet include asio headers). How do you do that in your projects? An example project, with a cmakelists would be very helpful

10 ответов

12 просмотров

cmake usually comes with find modules which can find third party libraries for you. After that you add a library with target_link_library() and add headers with target_include_directories()

Hayk Zneigras
do you mean find_package?

yep, i could show you how to add asio to a project i guess. Wait a sec

Hayk Zneigras
yes that would be very helpful!

can you point to me to a decent hello world example or something? i can't be bothered to write usage code D

i would prefer a pastebin

Hayk-Zneigras Автор вопроса
Hayk Zneigras
https://pastebin.com/qKTFyzNj

lol i thought you'd send me something complex which shows some basic usage, i could have included headers myself

Hayk-Zneigras Автор вопроса
Manav | avoid unnecessary messaging me
lol i thought you'd send me something complex whic...

I see, I forgot that it might still be badly linked even when the header is being included properly

Похожие вопросы

Обсуждают сегодня

Если у меня есть такой класс: Object = {} function Object:new(a_name, a_transform, a_color, a_mesh, a_material, a_shader, a_textures) local private = {} private.n...
Cuarno Vile
4
А кто-то пробовал, уезжая из Эстонии получить э-рез и продолжить вести предпринимательскую деятельность внутри Эстонии, используя свой OÜ?
Lalalashechki Lalala
62
Is Kadena onto something special? No one really knows. Good luck!
Bright Uncle Stephen EqualBet
40
At which price point will BCH, an ASIC mined coin, be succeptible to reorg attacks because of low hashrate? $10? $1? $0.1? $0.01?
Kishniev
18
я не магистр хаскеля, но разве не может лейзи тип конвертнуться в не-лейзи запросив вычисление содержимого прям при инициализации?
deadgnom32 λ madao
100
зачем же переименовывать ? чтобы кол-во участников возросло или вдруг IBM от этого снова на свифте начнет кодить ? Я не понимаю что страшного в том что свифт гавно, если это т...
Oleh Nerzh
10
Гайз, кто-нибудь пробовал запустить probe-rs под камень, которого нет в probe-rs? Мб есть какой-нибудь пример у кого... Через target-gen попробовал сгенерировать chip-descript...
Максим Смирнов
2
I hodl ocean for a long time. Is there new development that I should read?
A33
12
здравствуйте. совершаю вот такую вещь: strcpy(line, (char)current_number); где current number — неподписанный шорт, line — массив чаров. ругань следующая: main.c:29:30: error...
Roberto's Ширгозиев
13
How is any merchant expected to know where his customers' money comes from? Surely criminals may give cash to their wife to go to the grocery store
Maybe
10
Карта сайта