Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Errors when running Modelsim code

Status
Not open for further replies.

tarkyss

Full Member level 6
Joined
Aug 1, 2005
Messages
340
Helped
26
Reputation
52
Reaction score
8
Trophy points
1,298
Location
China
Activity points
4,162
ld command gcc

I used the example
h**p://www.asic-world.com/verilog/pli2.html#Modelsim
but when i run
gcc -c -g -I$MODEL/include pli_full_example_modelsim.c
there are a warning
hello_vpi_modelsim.c: In function `registerHelloSystfs':
hello_vpi_modelsim.c:9: warning: assignment from incompatible pointer type
then i run
ld -shared -E -o pli_full_example.sl pli_full_example_modelsim.o
it is said ther are no -shared and -E parameter, I check my ld, my ld has not the two parameters
then i dont user -shared and -E, used ld -o only
but it display
vpi_printf and vpi_register_systf are not defined
even i excute
cat /user/modelsim6.1a/modeltech/include/vpi_user.h >> hello_vpi.c
it still display
vpi_printf and vpi_register_systf are not defined
why
i try my own code, running gcc, there is no warning, but when running ld it cannot work yet,
in my code srand and rand function is used
so it said srand is not defined
thanks
 

Re: about gcc and ld command

You will need to add modelsim libraries if you want to link executeble with ld. Also -shared is used to generate shared library and not an executable program.
 

Re: about gcc and ld command

use the manual pages for the best help....i mean the man command...
 

Re: about gcc and ld command

**broken link removed**

GCC_-_The_Complete_Reference_McGraw_Hill-2002.pdf
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top