Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use shared library in fantastic example #40

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

mdsanima
Copy link
Contributor

Moved the printing logic from the main executable to a new shared library in the fantastic example, streamlining the main.cc file. This change encourages modularity and demonstrates shared library usage in the project. By extracting logic into lib.cc and including it as a dynamic library, we set a precedent for future development practices and improved the project structure for easier maintenance and enhancement.

  • Introduced fantastic as a shared library.
  • Updated main.cc to utilize the new library for printing messages.
  • Added lib.cc and lib.hh to implement the message printing functionality in a separate module.

This modification not only makes the code more organized but also provides a practical example of how to create and link shared libraries within a CMake project

Moved the printing logic from the main executable to a new shared
library in the fantastic example, streamlining the `main.cc` file.
This change encourages modularity and demonstrates shared library
usage in the project. By extracting logic into `lib.cc` and including
it as a dynamic library, we set a precedent for future development
practices and improved the project structure for easier maintenance
and enhancement.

- Introduced `fantastic` as a shared library.
- Updated `main.cc` to utilize the new library for printing messages.
- Added `lib.cc` and `lib.hh` to implement the message printing
functionality in a separate module.

This modification not only makes the code more organized but also
provides a practical example of how to create and link shared
libraries within a CMake project
@mdsanima mdsanima merged commit 1814cea into main Apr 25, 2024
1 check passed
@mdsanima mdsanima deleted the feat/example-demo-lib branch April 25, 2024 00:11
mdsanima added a commit that referenced this pull request Apr 25, 2024
This program is the same as `mdsanima-fantastic` but in different
file extension for the demo purpose only.

Related: #40
mdsanima added a commit that referenced this pull request Apr 25, 2024
This program is the same as `mdsanima-fantastic` but in different
file extension for the demo purpose only.

Related: #40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant