Compilation problem on Windows for Visual Studio 2005
|Assignee:||Wilson Snyder||% Done:||
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)
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.)
Also available in: Atom