8000 error C3688: invalid literal suffix 'PRId32' · Issue #416 · zlib-ng/minizip-ng · GitHub
[go: up one dir, main page]

Skip to content
< 8000 link rel="modulepreload" href="https://github.githubassets.com/assets/fhi-7a633016e960b921.js" crossorigin="anonymous" />

error C3688: invalid literal suffix 'PRId32' #416

Closed

Description

@Anton-V-K

It is not possible to compile minizip\test\test.c with MS VS 2017 because of numerouse errors of same type:
error C3688: invalid literal suffix 'PRId32'; literal operator or literal operator template 'operator ""PRId32' not found

It seems the C++ compiler can't properly handle lines like:

        printf("%s encrypted %"PRId32"\n", encrypt_path, written);

Adding spaced around PRId32 and PRId64 (to separate the tokens) resolves the issue.

It seems the problems is specific to C++ compiler, because similar fragments in other C-files are compiled fine (by C compiler).
The error happens when file is included (in a C++ file) this way:

extern "C"
{
#include <minizip/test/test.c>
}

Activity

  1. changed the title [-]error C3688: invalid literal suffix 'PRId32'; literal operator or literal operator template 'operator ""PRId32' not found[/-] [+]error C3688: invalid literal suffix 'PRId32'[/+] on Sep 8, 2019
  2. nmoinvaz commented on Sep 9, 2019

    @nmoinvaz
    Member

    PRId32 is found in inttypes.h. The test.c source file is not intended to be used as an include.

  3. nmoinvaz commented on Sep 9, 2019

    @nmoinvaz
    Member

    If you want to add spaces around those inttypes.h #defines and submit as a PR.

  4. added
    compilationIssues related to compiling source code
    fixedIssue or bug has been fixed
    on Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compilationIssues related to compiling source codefixedIssue or bug has been fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0