It's all about the answers!

Ask a question

How to build c++ code in RTC.


jyoti mishra (45148) | asked Sep 18 '17, 1:58 a.m.

 Hello Everyone,

                         I want to build the c++ code using RTC. I have build the java code in RTC,but I am not having any idea about c++ build.If any one knows,how to perform these,then please inform me.
Thanks and regard
jyoti.

Accepted answer


permanent link
Ulf Arne Bister (1.3k413) | answered Sep 18 '17, 11:20 a.m.

Hi,

please see general examples in https://jazz.net/wiki/bin/view/Main/BuildExamples and the C++ example in https://jazz.net/wiki/bin/view/Main/CppBuild

If this answers your question please mark this answer accepted.

- Arne

jyoti mishra selected this answer as the correct answer

Comments
jyoti mishra commented Oct 03 '17, 1:46 a.m. | edited Oct 03 '17, 2:13 a.m.

 Hi Ulf Arne Bister,

                             I have to build simple c++ project.Do I have to create makefile of that c++ project,or I have to create simple makefile project.I am using p2 repository and CDT with java luna eclipse.Is there need of using c++ eclipse instead of CDT.
Thanks in advance.
 


Ulf Arne Bister commented Oct 04 '17, 3:14 a.m.

Jyoti,
generally to build a c++ project you need to <make> and then to <compile> the source code. Eclipse as the editor will allow you to tie in make tools such as cmake and compiler such as gcc (which on windows requires e.g. mingw in addition). All this is well outside the scope of RTC which is language agnostic.
You might want to use http://www.codeguru.com/cpp/cpp/getting-started-with-c-for-eclipse.html or similar as a primer.


jyoti mishra commented Oct 04 '17, 8:22 a.m.

  Hi Ulf Arne Bister,

                      Will you please tell me,what to write inside working directory and properties file of   build defination file.  
I am getting the following error-"java.io.IOException: Cannot run program "make" (in directory "F:\IBM\installs\workspaces\build\cpp\HelloCppMakefile\makefile"): CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source)at com.ibm.team.build.internal.engine.CommandLineBuildParticipant.execute(CommandLineBuildParticipant.java:302)atcom.ibm.team.build.internal.engine."


Ulf Arne Bister commented Oct 04 '17, 10:24 a.m.

Jyoti,
you have to make sure that the make executable (as well as compiler) are installed and in the system path where the build engine is running. Does making and compiling work manually on the build machine (e.g. outside of Eclipse or from Eclipse)? Do your PATH environment variables contain the path to the executables? Which make / cc are you using and what OS does your build machine have?


jyoti mishra commented Oct 05 '17, 5:00 a.m.

  Hi Ulf Arne Bister,

                              I have installed CDT in luna eclipse and mingw. I am using windows10. I have set the environment variable as-C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;.
          yes making and compiling work manualy on eclipse machine.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.