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

version 1.5 compling error #28

Open
AnthonyYao1 opened this issue Dec 7, 2024 · 0 comments
Open

version 1.5 compling error #28

AnthonyYao1 opened this issue Dec 7, 2024 · 0 comments

Comments

@AnthonyYao1
Copy link

When I run gcc -o test test.c minIni.c at minIni-1.5/dev, it says as follow.

In file included from test.c:8:
minIni.h:54:24: error: unknown type name ‘TCHAR’
   54 | int  ini_putbool(const TCHAR *Section, const TCHAR *Key, int Value, const TCHAR *Filename);
      |                        ^~~~~
minIni.h:54:46: error: unknown type name ‘TCHAR’
   54 | int  ini_putbool(const TCHAR *Section, const TCHAR *Key, int Value, const TCHAR *Filename);
      |                                              ^~~~~
minIni.h:54:75: error: unknown type name ‘TCHAR’
   54 | int  ini_putbool(const TCHAR *Section, const TCHAR *Key, int Value, const TCHAR *Filename);
      |                                                                           ^~~~~
In file included from minIni.c:33:
minIni.h:54:24: error: unknown type name ‘TCHAR’
   54 | int  ini_putbool(const TCHAR *Section, const TCHAR *Key, int Value, const TCHAR *Filename);
      |                        ^~~~~
minIni.h:54:46: error: unknown type name ‘TCHAR’
   54 | int  ini_putbool(const TCHAR *Section, const TCHAR *Key, int Value, const TCHAR *Filename);
      |                                              ^~~~~
minIni.h:54:75: error: unknown type name ‘TCHAR’
   54 | int  ini_putbool(const TCHAR *Section, const TCHAR *Key, int Value, const TCHAR *Filename);
      |                                                                           ^~~~~
minIni.c:961:5: error: conflicting types for ‘ini_putbool’; have ‘int(const char *, const char *, int,  const char *)’
  961 | int ini_putbool(const TCHAR *Section, const TCHAR *Key, int Value, const TCHAR *Filename)
      |     ^~~~~~~~~~~
minIni.h:54:6: note: previous declaration of ‘ini_putbool’ with type ‘int(const int *, const int *, int,  const int *)’
   54 | int  ini_putbool(const TCHAR *Section, const TCHAR *Key, int Value, const TCHAR *Filename);
      |      ^~~~~~~~~~~

I noticed that I changed line 54 of the minIni.h file and the compling is OK. Is this a code error?

- int  ini_putbool(const TCHAR *Section, const TCHAR *Key, int Value, const TCHAR *Filename);
+ int  ini_putbool(const mTCHAR *Section, const mTCHAR *Key, int Value, const mTCHAR *Filename);
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