Advanced search
Evgenij LegotskojDec. 28, 2018, 8:09 p.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. 13, 2018, 2:57 a.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. 5, 2018, 4:47 a.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. 30, 2018, 1:10 a.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, 4:57 p.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, 9:40 p.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:

D:\EVILEG\boost_1_61_0

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.

Timeweb

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
VD

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

  • Result:73points,
  • Rating points1
Ds

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

  • Result:64points,
  • Rating points-1
o

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

  • Result:86points,
  • Rating points6
Last comments
D:

QML - Lesson 016. SQLite database and the working with it in QML Qt

Добрый день, пытаюсь разобраться и подргнать пример под себя. Есть бд с огромным количеством полей. В приложении на виджетах при использовании QTableView все работает и путем простого sql запрос…

Django - Tutorial 039. Adding private messages and chats on the site - Part 2 (Dialogue and chat counter with unread messages)

Добавляйте поле файла в модель сообщения. И в форме сообщения указывайте, что поле с файлом.
s

Django - Tutorial 023. Like Dislike system using GenericForeignKey

все, я со всем разобрался!) Извините!)
s

Django - Tutorial 023. Like Dislike system using GenericForeignKey

Доброго времени суток!) Я случайно набрел на вашу статью, и она помогла мне решить некоторые мои трудности, я прошел за вами по шагам, в попытках адаптировать это под себя, и возник вопрос. У ва…
Now discuss on the forum
M

QML: изменение стиля при наведении и при нажатии на кнопку

enabled = false перестанет быть активной и не будет ни на что реагировать) Хм.. по-моему пробовал такое. Проверю ещё раз после работы. Ура, спасибо большо…
U

Динамическое наполнение StackView QML

Во затупил))) Спасибо за все))) StackView.push("ModuleTip1.qml") ну или в сложной иерархии StackView.push("qrc:/folder/ModuleTip1.qml") и всего делов... Не пойму, почему сра…

QEventLoop тормозит при удалении экземпляра

Думаю, что нет. Лучше вообще без исключений, но не всегда возможно.
s

Ключевое слово class

Разобрался,на стаковерфлоу нашел топик и понял почему так происходило .

Поведение пустой очереди std::queue

Спасибо, так и сделал.
About
Services
© EVILEG 2015-2020
Recommend hosting TIMEWEB