Is it possible to convert folders into projects? [Question]
Dear Eran and developers
I have been experimenting with the codes from The Algorithms in C++ and I have been wondering if there is a way (embedded in CodeLite or not) to convert each folder into a Project inside a workspace.
I have created a workspace inside the cloned folder, created a project math as an example and added all the related source files from the respective math folder
Evidently, compile+build fails because each .cpp file is an independent code with its own _main()_ function and thus "multiple definitions of main" is thrown.
I assume that the only way to achieve this would be to manually create each project and link individual source code files. Is this correct?
Thanks
Since it uses CMake as its build process, I would actually use File System Workspace instead of the standard C++ workspace.
You can define how to build it from the (top level folder) settings -> build tab
Building the source code should be:
- Create a workspace of type "File System Workspace"
- Open a terminal / MSYS2 terminal on Windows
- types
cd /path/to/C-Plus-Plus
mkdir build-debug
cd $_
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug
make -j$(nproc)
Dear Eran
I truly appreciate your reply. Thank you for taking the time.
I will try this and get back to you.
Thank you for developing CodeLite. It is awesome!
🍻