Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT Toolchain-Plugin Tutorial
CDT Toolchain-Plugin Tutorial [message #658676] Wed, 09 March 2011 08:08 Go to next message
Nex is currently offline Nex
Messages: 2
Registered: March 2011
Location: Germany
Junior Member
Hi Nex here,

im quite an newb in "programming" Eclipseplugins, especially toolchains for CDT.
Today i did the Tutorial from the CDT manual.
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .cdt.doc.user/concepts/cdt_c_projects.htm

6 Tutorial: An Example Tool Integration
I did it until
6.11 Testing the ProjectType

Well, it says i can use a C or C++ Project to create this toolchain. Well if i create a C Project, i'm able to select the toolchain.

But if i select "new C++" Project its not possible to create my example Project Sad
the Compiler(tool).natureFiler is "both". How to fix that problem ? My task is to set up a C++ toolchain Sad

http://image-upload.de/thumb/oekKOO/af162a8568.jpeg
I'm using the latest builds of eclipse (helios) and CDT 7.0.2


Thanks in advance.
Nex

plugin.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         id="org.eclipse.cdt.example.toolchain"
         name="Example Tool Chain"
         point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
      <projectType
            id="example.toolchain.executable"
            isAbstract="false"
            isTest="false"
            name="Example Executable">
         <configuration
               cleanCommand="rm -f"
               errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;"
               id="example.toolchain.configuration.release"
               name="Test Release">
            <toolChain
                  id="example.toolchain.toolchain"
                  isAbstract="false"
                  name="Example Tool-chain"
                  osList="all">
               <builder
                     command="make"
                     id="example.toolchain.builder"
                     isAbstract="false"
                     isVariableCaseSensitive="false"
                     name="Example Builder">
               </builder>
               <targetPlatform
                     binaryParser="org.eclipse.cdt.core.PE"
                     id="example.toolchain.targetplatform"
                     isAbstract="false"
                     name="Example Target Platform"
                     osList="all">
               </targetPlatform>
               <tool
                     command="gcc"
                     id="example.toolchain.compiler"
                     isAbstract="false"
                     name="Compiler"
                     natureFilter="both"
                     outputFlag="-o">
                  <inputType
                        dependencyCalculator="org.eclipse.cdt.managedbuilder.makegen.internal.DefaultIndexerDependencyCalculator"
                        dependencyContentType="org.eclipse.cdt.core.cHeader"
                        dependencyExtensions="h"
                        id="example.toolchain.compiler.input"
                        primaryInput="true"
                        sourceContentType="org.eclipse.cdt.core.cSource">
                  </inputType>
                  <outputType
                        buildVariable="OBJS"
                        id="org.eclipse.cdt.example.toolchain.outputType1"
                        outputs="o"
                        primaryOutput="true">
                  </outputType>
               </tool>
            </toolChain>
         </configuration>
      </projectType>
   </extension>
</plugin>

Re: CDT Toolchain-Plugin Tutorial [message #658684 is a reply to message #658676] Wed, 09 March 2011 08:19 Go to previous message
Nex is currently offline Nex
Messages: 2
Registered: March 2011
Location: Germany
Junior Member
setting
sourceContentType="org.eclipse.cdt.core.cSource"

to
sourceContentType="org.eclipse.cdt.core.cxxSource"


works now.
Previous Topic:Build error discovery fails
Next Topic:sourcing setup file
Goto Forum:
  


Current Time: Sat Aug 23 03:33:51 EDT 2014

Powered by FUDForum. Page generated in 0.01554 seconds