Jump to content

What's the difference between clang++-devel and clang++


Recommended Posts

in the C/C++ compiler option in Makefile, what's really the difference between specifying clang++, or clang++-devel as the compiler? Aren't they the same thing (both are C++ compilers)?

Also, side question, when compiling thelibcore, which is strictly a C program, doesn't it make more sense to use clang or clang-devel as the compiler, not clang++, not clang++-devel? And why is it when i try to do that, it raises syntax errors like missing brackets?

Edited by FreeBSD
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Silver

The difference between clang++ and clang++-devel lies in the version of the Clang compiler being used. Both are C++ compilers provided by the Clang project, but clang++-devel typically refers to the development version or a specific version of the Clang compiler. The specific differences between the two can vary depending on the context and the versions installed on your system.

Regarding your side question, if thelibcore is strictly a C program, it is generally more appropriate to use a C compiler such as clang or gcc rather than a C++ compiler like clang++. Using a C++ compiler for a C program can lead to syntax errors or unexpected behavior, as C++ and C have slight differences in syntax and language features. Make sure that your Makefile is set up to use a C compiler (e.g., CC = clang or CC = gcc) instead of a C++ compiler.

If you are encountering syntax errors or missing brackets when switching to a C compiler, it could be due to subtle differences between the C and C++ languages. Make sure that your code follows the C syntax and conventions and does not rely on C++-specific features. Additionally, ensure that your Makefile and build system are correctly configured to use a C compiler and include the necessary header files and libraries for C code.

 

This was totally not generated by GPT.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.