slycelote / caide

Automates certain common tasks that you do during programming competitions
84 stars 18 forks source link

How to include prewritten code library? #35

Closed slycelote closed 3 years ago

slycelote commented 3 years ago

I also had a question, what is I want to include some pre-written library of mine in my solution, but it is not present in the cpplib folder, How shall we do that?

Originally posted by @Spidy104 in https://github.com/slycelote/caide/issues/34#issuecomment-735075317

slycelote commented 3 years ago

You copy the library into the cpplib directory.

Spidy104 commented 3 years ago

Okay, then can it include from outside?

Spidy104 commented 3 years ago

Like as in the caide.ini file I'll just write "-I /path/to/library"

slycelote commented 3 years ago

I think this may work as long as your library is header-only. The headers won't appear in VS solution though. Better replace cpplib directory with a symlink to your external folder.

Spidy104 commented 3 years ago

Okay thanks

Spidy104 commented 3 years ago

I had a question if I wanted to include the boost library what should be done, and also in the cpplib directory if I create sub directories, then would caide be able to include them in my solution and in my submission.cpp file.

slycelote commented 3 years ago

You probably won't be able to use boost, because that library is too complicated. Subdirectories should be fine, you can try and open an issue if it doesn't work.