Skip to content

version 1.5 compling error #28

@AnthonyYao1

Description

@AnthonyYao1

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions