Advanced search
Evgenij LegotskojDec. 28, 2018, 9:09 a.m.

BoostBoost - performing periodic tasks using boost::thread

Boost, threads, chrono

I propose to write a small console program that will perform one task at regular intervals.

For example, the program starts and makes 10 samples within 10 seconds, while the program will display information about the number of the countdown in the console.

The program will work as follows.

Выполнение периодический задачи в консольном приложении

Evgenij LegotskojDec. 12, 2018, 3:57 p.m.

C++CMake project with subdirectories and static library

Boost, static, static link

I propose to write a small application that will have two subdirectories. One of which will compile the executable file, and the second will contain a statically linked library.

As a result, the project will look like this.

Project with static library

Evgenij LegotskojDec. 4, 2018, 5:47 p.m.

BoostBoost - Use enum in parameters boost::program_options

options, class enum, Program, Boost

A small addition to the article on the use of boost::program_options .

In this appendix I will describe how to use enum enums. Because immediately they do not work. By default, boost::program_options work only with basic types and some types from the standard library, for example std::string .

Evgenij LegotskojNov. 29, 2018, 2:10 p.m.

BoostBoost - static linking in CMake project under Windows

cpp, Boost, linking, C++, static

A small note about static linking Boost, so as not to forget.

Initial data:

  • OS Windows
  • MSVC 2017 64bit
  • Boost 1.68.0
  • CMake project
An example will be shown in the simplest version without special variable settings. Maximum default.

Evgenij LegotskojNov. 18, 2018, 5:57 a.m.

BoostBoost - Console program menu using boost::program_options

cpp, Boost, Menu, C++

And here is an article on the boost of my some accumulated materials. I offer you the option of writing a console program with support for the console menu, which is implemented using boost::program_options .

boost::program_options is responsible for processing the arguments passed to the program and sets all the necessary variables without the need to implement long logic from if else branches. This is already implemented inside boost::program_optons .

Suppose our program takes the following data as arguments

  • input file path
  • output file path
  • the size of the block being processed, no matter why, we will not do anything with it, just have such a parameter in the program.

Also, the program will have a help menu, which will be the console menu.

The figure below shows the use of this program.

Evgenij LegotskojJuly 28, 2016, 11:40 a.m.

QtQt/C++ - Lesson 056. Connecting the Boost library in Qt for MinGW and MSVC compilers

Boost, MinGW, MSVC, Qt

Initial acquaintance with Boost on Windows start to build precompiled libraries and connecting them to the project on Qt. This code will use one of the Hello World-s from the Boost documentation, namely the installation locale using boost.

Building Boost for MinGW

First, download the latest version of Boost (as of this writing is version 1.61) and unpack the archive into a folder. In my case, the archive is unpacked in the following path:


Then open the console and go to the folder. In this folder there is a batch file to build bootstrap.bat bjam tool, which is designed to control compilation target libraries under the compiler.

To build this tool for MinGW run the following command:

bootstrap.bat gcc

Once the tool is assembled perform the assembly of all the necessary libraries with the following command:

b2 toolset=gcc link=shared --prefix=boost_mingw_530 install  // , where
    // toolset  - this tool, which will be collected in the library, 
    //            ie the type of compiler, which you will collect the library
    // link     - this type of library, in this case the shared - dynamic
    // --prefix - folder which will be copied the header files and libraries compiled
    //            in my case D:\EVILEG\boost_1_61_0\boost_mingw_530

Then you can go about their business, because this process is not fast.


Let me recommend you the excellent hosting on which EVILEG is located.

For many years, Timeweb has been proving his stability.

For projects on Django I recommend VDS hosting

View Hosting

C++ - Тест 003. Условия и циклы

  • Result:42points,
  • Rating points-8
  • enfant
  • Oct. 14, 2021, 2:59 p.m.

C++ - Test 002. Constants

  • Result:75points,
  • Rating points2
  • enfant
  • Oct. 14, 2021, 2:54 p.m.

C++ - Test 001. The first program and data types

  • Result:93points,
  • Rating points8
Popular publications in the last 90 Days
Last comments

Qt/C++ - Lesson 060. Configuring the appearance of the application in runtime

Добрый вечер, на "лету" не работает, только перезапуск

Qt/C++ - Lesson 060. Configuring the appearance of the application in runtime

Спасибо, завтра опробую и отпишусь по результату

Django - Tutorial 007. Adding Pagination based on django-bootstrap3

Просто список каких-нибудь объектов передавайте, который дёрнули ищ api стороннего сервера from django.core.paginator import Paginatorobjects = ['john', 'paul', 'george', 'ringo']p = Pagina…

PyQt5 - Tutorial 009. Using QThread with MoveToThread

Спасибо большое

PyQt5 - Tutorial 009. Using QThread with MoveToThread

Вызвать либо метод quit() либо эквивалентный его вариант - метод exit(0)
Now discuss on the forum
  • Nomad
  • Oct. 15, 2021, 6:39 a.m.

Вопрос из раздела "как реализовать"

Всем привет. Есть бизнес логика которую надо реализовать на джанге, она состоит в следующем: надо реализовать функционал регистрации/авторизации компаний у которого есть свой дашборд …

Проблема с созданием файлов перевода для составного проекта

Я имею ввиду, если у вас был старые ts файлы, то написать парсер, который составил бы словарь переводов. Например. "Hello world" - "Привет мир" "Hello dev" - "Привет dev" и…

QPsql Компиляция драйвера

при компиляции драйвера из окна Qt 5.15.2 (MSVC2019 64 ) надо было запустить C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat тогда компиляция вып…
  • Pisych
  • Oct. 12, 2021, 10:59 p.m.

Фильтр в Select формы Django

Добрый день! Подскажите, как можно сделать? Есть форма, связанная с моделью. В форме Select, выбор типа документа (Приход, Расход,Списание). Этот Select берет данные из таблицы типов документов.…

Вызов функции Python с Qml

Чтобы onResult в QML подключилось к чему-то в Python, нужно чтобы result было сигналом, а у вас это слот. В качестве сигнала определено takeFunc и в данном случае в QML должно ра…
© EVILEG 2015-2021
Recommend hosting TIMEWEB