Hi Janice,

please have a look at the Thrift tutorial code, which is a good example for IDL files including each other. This works fine for me, so maybe you want to have a look if you find can spot the problem in your IDL. A common mistake is to forget the prefix of the included type:

file one.thrift:

   type string foo

file two.thrift

   include "one.thrift"

   struct bar {
       1: one.foo  baz  // note the prefix before "foo"
   }


If you still have problems, please the relevant excerpts of your IDL files or prepare a short example demonstrating the issue, and we will try to help you.

Have fun,
JensG




-----Ursprüngliche Nachricht----- From: Janice Vann
Sent: Friday, November 15, 2013 6:16 PM
To: [email protected]
Subject: TypeDef in shared file?

I would like to declare a custom typedef in my shared.thrift file so it can
be used by any other thrift file that includes shared.thrift. For example:

typedef string datetimestring

However, it won't compile (using Thrift compiler 0.9.1 for Delphi). So I
guess we just have to include the custom typedef in each file that needs
it. Is that right or am I missing something?

Thanks!
Janice

Reply via email to