use custom interpreter
Hi I wrote an interpreter for cpp. how can I use it in ros and write my code for this interpreter?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Hi I wrote an interpreter for cpp. how can I use it in ros and write my code for this interpreter?
I assume you mean that you wrote a compiler for C++, since C++ is not an interpreted language.
ROS uses whatever compiler the environment says is the current one. How to change the compiler for your environment (which can be done on a shell-by-shell basis, or system wide) is not really ROS specific, but it's also easy enough to do. Set the CC
environment variable to the compiler's executable to change the C compiler, and the CXX
environment variable to change the C++ compiler. If you are using CMake (which you are for ROS) then you can also do it in a CMakeLists.txt file by setting the CMAKE_C_COMPILER
and CMAKE_CXX_COMPILER
variables to the path to the compiler executable. I'm not sure how much Catkin will like having this variable changed in one package, though. It might take effect for the whole workspace, or it might just be overridden.
Setting environment variables is a basic Linux question. I suggest you read up on how to use the shell, and if you have any further Linux-related questions, ask them at a Linux help site.
Asked: 2018-04-14 06:02:21 -0500
Seen: 246 times
Last updated: Apr 15 '18