Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function in C file not generated if a typedef added in header file. #86

Open
jamesrr39 opened this issue Feb 1, 2025 · 0 comments
Open

Comments

@jamesrr39
Copy link

jamesrr39 commented Feb 1, 2025

Hi,

It appears a function that is defined in C code is not generated if it is defined after an enum type definition. An example to reproduce:

src/a.h

typedef enum {
    FIRST = 0
} X;

int a();

src/a.c

#include "a.h"

int a() {
    return 1;
}

cxgo.yml

root: ./src
out: ./out
package: out
use_go_int: true
files:
  - name: '*'

What is generated:
out/a.go

package out

type X int

const FIRST X = 0

(a() function is not in generated Go code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant