Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

VPI on Windows #42

Description

@gatk555

I am mainly here to thank developers for this nifty repository. Lacking a Windows machine, I am using Actions to check that my code can work there and expected to have to build my own GHDL. This Action has saved much time.

I have run into a problem, for which likely perhaps a documentary fix is possible. Background: I build with "ghdl -e -shared", adding my own code with "-Wl,ghdl_shim.o". No problem there, but I also have a VPI module built with:

"shell ghdl --vpi-link clang ghdl_vpi.o -o ghdlng.vpi -lm -L. -l$base"

That is also apparently fine, DUMPBIN.EXE says it is a good DLL, although MSYS's ldd chokes on it. (The last part is because this VPI code calls back into the main DLL.) But when trying to run:

loading VPI module './ghdlng.vpi'
The specified module could not be found.

555:error: cannot load VPI module './ghdlng.vpi

A fix is straightforward: "copy D:\a_temp\msys64\UCRT64\lib\libghdlvpi.dll ." So the problem is a combination of lousy error reporting by the OS (GHDL seems to do the right thing), and the library is not in the DLL search path. Being a baby at Windows admin, I have no idea how to add it, but if that is not easy it may be worth documenting this trap. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions