[logo] 
 
Home
News
Activity
About/Contact
Major Tools
  Dinotrace
  Verilator
  Verilog-mode
  Verilog-Perl
Other Tools
  BugVise
  CovVise
  Force-Gate-Sim
  Gspice
  IPC::Locker
  Rsvn
  SVN::S4
  SystemPerl
  Voneline
  WFH
General Info
  Papers

Issue #42

Compilation problem on Windows for Visual Studio 2005

Added by John Stroebel over 4 years ago. Updated over 4 years ago.

Status:Closed Start date:10/27/2008
Priority:Normal Due date:
Assignee:Wilson Snyder % Done:

0%

Category:Configure/Make/Compiling
Target version:-

Description

I am currently using version 3.670 of Verilator. I receive a few errors when compiling verilated code in Visual Studio 2005 on Windows. In verilated.cpp I needed to add "#include <string>" to remove a bunch of compile-time errors. I still get an error in function VL_FGETS_IXQ because of the following line of code: char buffer[bytes]; The compiler is expecting a constant expression for the size of buffer. "bytes" is a variable. Finally, in verilatedos.h, I had to modify the typedef of uint32_t in the _WIN32 section from: typedef unsigned long uint32_t; ///< 32-bit unsigned type (backward compatibility) to typedef unsigned int uint32_t; ///< 32-bit unsigned type (backward compatibility)

History

Updated by Wilson Snyder over 4 years ago

  • Category set to Configure/Make/Compiling
  • Assignee set to Wilson Snyder

The cstring issue is fixed in the git head and will be in the next release.

Runtime automatic variables are legal in C99, which I guess MSVC++ gets upset about. I'll see what to do.

It's hard to know what to do about the typedef as there are way too many conflicting standards. If you can find a ifdef that works for appropriate versions of MSVC++ I'll change it. (I don't have MSVC++ to test it here though, sorry.)

Updated by Wilson Snyder over 4 years ago

  • Status changed from New to Closed

I updated the #ifdef to MSVC as you suggested, and fixed the typedef.

Pushed to git; will be in next release.

Also available in: Atom