4 Replies Latest reply on Feb 20, 2009 11:37 AM by Peterp

    Problem with struct and #include

    Peterp

      Hello,

      i have a probem with a self defined datatype, i have my headerfile type.h

      with this def.

      [code]

      struct my_float8
      {
         float4 nibble1;
         float4 nibble2;
      };

      [/code]

      And i want to use it in my br-file like this:

      [code]

      #include "type.h"

      void funk(int length, float *daten)
      {
           my_float8 mf8;
       }

      [/code]

      But i always get this compile error:

      Error (parse error) before 'Identifier' my_float8 mf8;

        • Problem with struct and #include
          gaurav.garg

          Hi Peterp,

          To use a structure brcc requires its definition to be present in the br file. Brcc generates multiple buffers with the types defined in structure.

          Brcc doesn't have support to parse #include directive, hence it doesn't find the definition and you see this error.

           

            • Problem with struct and #include
              Peterp

               

              Originally posted by: gaurav.garg Hi Peterp,

              To use a structure brcc requires its definition to be present in the br file. Brcc generates multiple buffers with the types defined in structure.

              Brcc doesn't have support to parse #include directive, hence it doesn't find the definition and you see this error.

              Hi,

              if i write the def. into the br-file like this :

              [code]

              void transpose_brook(int length, float *daten)
              {
                  struct my_float8
                  {
                    float4 nibble1;
                    float4 nibble2;
                  };
               my_float8 mf8<10>;
              }

              [/code]

              i get the same error.