Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation problem on Windows for Visual Studio 2005 #42

Closed
veripoolbot opened this issue Oct 27, 2008 · 2 comments
Closed

Compilation problem on Windows for Visual Studio 2005 #42

veripoolbot opened this issue Oct 27, 2008 · 2 comments
Assignees
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: John Stroebel
Original Redmine Issue: 42 from https://www.veripool.org
Original Date: 2008-10-27
Original Assignee: Wilson Snyder (@wsnyder)


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 " 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)

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2008-10-29T01:19:18Z


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.)

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2008-11-05T15:52:48Z


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

Pushed to git; will be in next release.

@veripoolbot veripoolbot added area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: configure/compiling Issue involves configuring or compilating Verilator itself resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

2 participants