# UXL and including cpp code

**URL:** <https://forums.fusetools.com/t/uxl-and-including-cpp-code/6721>\
**Category:** How-to Discussions\
**Created:** [January 28, 2016, 7:40am UTC](https://forums.fusetools.com/t/uxl-and-including-cpp-code/6721 "2016-01-28T07:40:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simo\_Santavirta](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/simo_santavirta/32/175_2.png) [@Simo\_Santavirta](https://forums.fusetools.com/u/Simo_Santavirta)\
**Post date:** [January 28, 2016, 7:40am UTC](https://forums.fusetools.com/t/uxl-and-including-cpp-code/6721/1 "2016-01-28T07:40:54Z")

</div>

Hey,

I’m trying to understand how this uxl works. I’m reading the uxl handbook and first trying to get some sort of result out of it. So I used the example there.

created Test3.cpp.uxl file:

```auto
<Extensions Backend="CPlusPlus">
    <Type Name="Test3">
        <Method Signature="FirstMethod(int):float">
            <Expression>((@{float})%%%~COMPRESS~PRE~15~%%%)</Expression>
        </Method>

        <Method Signature="SecondMethod(int):float">
            <Require Entity="Test3.NonStaticHelper(int)" />
            <Body><![CDATA[
                @{float} tmp = @{Test3.Helper(int):Call(%%%~COMPRESS~PRE~15~%%%)};
                return tmp + @{Test3:Of($).NonStaticHelper(int):Call(%%%~COMPRESS~PRE~15~%%%)};
            ]]></Body>
        </Method>
    </Type>
</Extensions>

```

And Test3.uno file:

```auto
[TargetSpecificImplementation]
class Test3
{
    [TargetSpecificImplementation]
    public extern float FirstMethod(int a);

    [TargetSpecificImplementation]
    public extern float SecondMethod(int a) // SecondMethod has a default implementation
    {
        return 0f;
    }

    public static float Helper(int a)
    {
        return (float)aa;
    }

    public float NonStaticHelper(int a)
    {
        return (float)aa;
    }
}

```

According to UXL-Handbook this should work, but I get errors from compiler. (dotnetexe build)

```auto
Test3.uno(1,2): E3114: There is no identifier named 'TargetSpecificImplementationAttribute' accessible in this scope.

```

What am I doing wrong here?

My final goal is to include a c++ header and start calling its methods, but first I would like to just get a basic setup for uxl working.

---

<div class="post-metadata">

**Author:** ![Bjorn-Olav\_Strand](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bjorn-olav_strand/32/583_2.png) [@Bjorn-Olav\_Strand](https://forums.fusetools.com/u/Bjorn-Olav_Strand)\
**Post date:** [January 28, 2016, 7:53am UTC](https://forums.fusetools.com/t/uxl-and-including-cpp-code/6721/2 "2016-01-28T07:53:50Z")

</div>

Just add `using Uno.Compiler.ExportTargetInterop;`
