axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Mole (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2C-750) Generated code will not build when there are cyclical header includes
Date Thu, 01 Nov 2007 17:38:50 GMT
Generated code will not build when there are cyclical header includes
---------------------------------------------------------------------

                 Key: AXIS2C-750
                 URL: https://issues.apache.org/jira/browse/AXIS2C-750
             Project: Axis2-C
          Issue Type: Bug
          Components: code generation
    Affects Versions: 1.1.0
         Environment: N/A
            Reporter: Michael Mole
            Priority: Minor


If I have a schema that allows for cyclical dependencies, the generated adb databindings will
not build.

For example, the generated code will look something like this:

foo.h
#include bar.h
typedef struct foo foo_t;

bar function();



bar.h
#include foo.h
typedef struct bar bar_t

foo function();


This will not compile.  foo.h will try to include bar.h.  bar.h then tries to resolve foo
in the function declaration, but it cannot because foo has not been defined yet.  This is
because the typedef in foo.h comes after the #include bar.h.

To resolve this issue, I moved the typedefs ahead of the #includes.  The generated code should
do this to avoid this problem with cyclical dependencies.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message