OpenPrinting / cups

OpenPrinting CUPS Sources
https://openprinting.github.io/cups
Apache License 2.0
1k stars 178 forks source link

visual studio compile error, 'm_criticalSection': is not a member of '_RTL_CRITICAL_SECTION' #801

Closed marco20240618 closed 10 months ago

marco20240618 commented 10 months ago

I used visual studio 2017 to build the cups.sln in the vcnet directory.

This is the compile error

c:\users\pcl\documents\tmp\cups\cups\globals.c(140): error C2039: 'm_criticalSection': is not a member of '_RTL_CRITICAL_SECTION' [C:\Users\pcl\Documents\tmp\cups\vcnet\libcups2.
vcxproj]
  c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winnt.h(20689): note: see declaration of '_RTL_CRITICAL_SECTION'
c:\users\pcl\documents\tmp\cups\cups\globals.c(140): error C2198: 'InitializeCriticalSection': too few arguments for call [C:\Users\pcl\Documents\tmp\cups\vcnet\libcups2.vcxproj]
c:\users\pcl\documents\tmp\cups\cups\globals.c(156): error C2039: 'm_criticalSection': is not a member of '_RTL_CRITICAL_SECTION' [C:\Users\pcl\Documents\tmp\cups\vcnet\libcups2.
vcxproj]
michaelrsweet commented 10 months ago

First, you'll probably need VC 2019 or later.

Second, what version of CUPS are you using?

marco20240618 commented 10 months ago

First, you'll probably need VC 2019 or later.

Second, what version of CUPS are you using?

I even tried the latest Visual Studio 2022, CUPS I used is the latest master version

michaelrsweet commented 10 months ago

OK, I've been able to reproduce. Fix coming up soon...

michaelrsweet commented 10 months ago

[master 2e931c9bc] Fix Windows builds (Issue #801)