Skip to content

Visual Studio compile error #60

Description

@leochan2009

Hi,
i am trying to compile the project on my windows 7 machine.
I have the following configuration:
Environment: Toolset=v140; Configuration: Debug; Platform: x86
However, i got the following error:

C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt\stdio.h(1421): fatal error C1189: #error: Macro definition of vsnprintf conflicts with Standard Library function declaration [C:\projects\openigtlink\build\Deps\openHEVC-bin\LibOpenHevcWrapper.vcxproj] [C:\projects\openigtlink\build\openHEVC.vcxproj]

I could fix the error by deleting the vsnprintf definition in CmakeLists file, showed as below:
if(WIN32)
add_definitions(
-Dsnprintf=avpriv_snprintf
-Dvsnprintf=avpriv_vsnprintf
-Dinline=__inline
-Drestrict=__restrict
)
endif()

Do you have a general solution for this problem?

Another issue is the function:
static attribute(always_inline)) inline ...................
This function also create error in compiling
after deleting the attribute(always_inline)) , the compiling succeeded.

Your kind answer to my questions would be greatly appreciated.

Best Regards,
Chan

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions