Menu

Error compiling in MSVC2019

Vsevolod
2020-04-18
2020-08-30
  • Vsevolod

    Vsevolod - 2020-04-18
    When compilling plplot, plgridd.c:
    ymath.h(48,49): error C2061: syntax error: identifier '_Denorm'
    ymath.h(48,49): error C2059: syntax error: ';'
    ymath.h(48,56): error C2059: syntax error: ','
    ymath.h(56,49): error C2061: syntax error: identifier '_FDenorm'
    ymath.h(56,49): error C2059: syntax error: ';'
    ymath.h(56,57): error C2059: syntax error: ','
    ymath.h(64,49): error C2061: syntax error: identifier '_LDenorm'
    ymath.h(64,49): error C2059: syntax error: ';'
    ymath.h(64,57): error C2059: syntax error: ','
     
     
    Compiler command line:
    /GS /TP /W3 /Zc:wchar_t /I"plplot-src\include" /I"plplot-src\lib\qsastime" /I"plplot-build" /I"plplot-build\include" /I"plplot-build\lib\qsastime" /I"plplot-build\bindings\wxwidgets" /Zi /Gm- /Od /Ob0 /Fd"plplot.dir\Debug\plplot.pdb" /Zc:inline /fp:precise /D "WIN32" /D "_WINDOWS" /D "PLPLOT_HAVE_CONFIG_H" /D "_CRT_SECURE_NO_DEPRECATE" /D "CMAKE_INTDIR=\"Debug\"" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /RTC1 /GR /Gd /MDd /Fa"plplot.dir\Debug\" /EHsc /nologo /Fo"plplot.dir\Debug\" /Fp"plplot.dir\Debug\plplot.pch" /diagnostics:column 
    -- 
    С уважением,
    начальник отдела разработки ПО Эко-Е
    Громов Всеволод Владимирович
     
    Best regards,
    head of Software Development dept. Eco-E
    Vsevolod V Gromov
     
    Skype: gromov.vsevolod
    Mobile: +79035975260
     
     
  • Aaron Hexamer

    Aaron Hexamer - 2020-08-30

    Ran into this same problem myself. The issue here is that the ymath header seems to be assuming we're compiling as C++. Because the VS project will compile it as C (default since plgridd has a .c extension), the syntax in the declaration of things like _Denorm (without 'union' in the type specifier) is illegal. In Visual Studio, if you right click on the plgridd.c file, select properties, then navigate to Advanced -> Compile As and select "Compile as C++ Code (/TP)", it will build. I cannot speak to whether the resulting plgridd functions work, because I don't use them.

     

    Last edit: Aaron Hexamer 2020-08-30

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.