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

Trouble with inttypes.h when trying to compile a program that uses repository.h on Ubuntu 13.04 #1632

Closed
maxwellhansen opened this issue Jun 4, 2013 · 1 comment

Comments

@maxwellhansen
Copy link

I took everything from include/git2 to /usr/include, then tried compiling the following program:

#include <stdio.h>
#include <repository.h>

int main(void) {
    puts("Hello, world!");
    return 0;
}

When I compile this with GCC, I get the following error:

maxwell@UNIX-PC:~$ gcc ok.c
In file included from /usr/include/common.h:16:0,
                 from /usr/include/repository.h:10,
                 from ok.c:2:
/usr/include/inttypes.h:33:2: error: #error "Use this header only with Microsoft Visual C++ compilers!"
In file included from /usr/include/inttypes.h:46:0,
                 from /usr/include/common.h:16,
                 from /usr/include/repository.h:10,
                 from ok.c:2:
/usr/include/stdint.h:33:2: error: #error "Use this header only with Microsoft Visual C++ compilers!"
In file included from /usr/include/inttypes.h:46:0,
                 from /usr/include/common.h:16,
                 from /usr/include/repository.h:10,
                 from ok.c:2:
/usr/include/stdint.h:89:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int64_t’
/usr/include/stdint.h:90:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uint64_t’
/usr/include/stdint.h:101:1: error: unknown type name ‘uint64_t’
/usr/include/stdint.h:111:1: error: unknown type name ‘uint64_t’
/usr/include/stdint.h:124:1: error: unknown type name ‘uint64_t’
In file included from /usr/include/common.h:16:0,
                 from /usr/include/repository.h:10,
                 from ok.c:2:
/usr/include/inttypes.h:282:1: error: unknown type name ‘_inline’
/usr/include/inttypes.h:284:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__cdecl’
/usr/include/inttypes.h:284:11: error: unknown type name ‘__cdecl’

I am trying to use some data structures defined in repository.h. Any idea what I am doing wrong?

@ahmedtalbi
Copy link

Did you fix this issue??

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

2 participants