I have seen C++ code saved as both .cc and .cpp files. Which of these (or another!) is the best practice/most modern/best to use? The Google style guide seems to suggest .cc, are there any other
C++ code file extension? What is the difference between .cc and .cpp
Recompile llama-cpp-python with the appropriate environment variables set to point to your nvcc installation (included with cuda toolkit), and specify the cuda architecture to compile for. For example, if I had downloaded cuda-toolkit-12-3 in the step above and wanted to compile llama-cpp-python for all major cuda architectures, I would run: Copy
There are also .h files that contain classes and their function definitions. Until now the program was compiled using the command g++ main.cpp. Now that I've separated the classes to .h and .cpp files do I need to use a makefile or can I still use the g++ main.cpp command?
Using G++ to compile multiple .cpp and .h files - Stack Overflow
That will also find files with extension c, Cpp, Hpp, which are either not cpp files, nor common extensions. Also, you did not escape the last dot properly, which means you will also math files named e.g. xcpp or .C. You introduced several problems by not mastering regular expressions and find properly.
how to use the unix "find" command to find all the cpp and h files?
The .cpp file is the compilation unit: it's the real source code file that will be compiled (in C++). The .h (header) files are files that will be virtually copied/pasted in the .cpp files where the #include precompiler instruction appears. Once the headers code is inserted in the .cpp code, the compilation of the .cpp can start.