Mixed _WIN32/WIN32 definitions causes compiler error over mkdir defintion in verilated.cpp in Visual Studio #1406
Labels
area: configure/compiling
Issue involves configuring or compilating Verilator itself
resolution: fixed
Closed; fixed
Author Name: Benjamin Gartner
Original Redmine Issue: 1406 from https://www.veripool.org
Original Assignee: Wilson Snyder (@wsnyder)
I get the following compile error when compiling verilated.cpp in Visual Studio.
Error C2039 'mkdir': is not a member of '`global namespace'' verilated.cpp 1783
The offending code seems to be here. Visual Studio defines _WIN32 and not WIN32 so it doesn't include direct.h and has no definition for mkdir. Looks like this was added in changeset c93d280 recently, so presumably this was tested in a cygwin environment that defines both.
Easy enough to define WIN32 in Visual Studio, but probably confusing to figure out that's what's needed. Probably as easy as changing to the following, assuming this doesn't break on cygwin environments:
The text was updated successfully, but these errors were encountered: