Skip to content

error C3688: invalid literal suffix 'PRId32' #416

@Anton-V-K

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>
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    compilationIssues related to compiling source codefixedIssue or bug has been fixed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions