32-bit HP700 platform
ModelSim loads shared libraries on the HP700 workstation. A shared library is created by creating object files that contain position-independent code (use the +z or -fpic compiler option) and by linking as a shared library (use the -b linker option). Use these gcc or cc compiler commands:
gcc -c -fpic -I/<install_dir>/modeltech/include app.c ld -b -o app.sl app.o -lccc -c +z -I/<install_dir>/modeltech/include app.c ld -b -o app.sl app.o -lcNote that -fpic may not work with all versions of gcc.
for HP-UX 11.0 users
If you are building the PLI/VPI library under HP-UX 11.0, you should not specify the "-lc" option to the invocation of ld, since this will cause an incorrect version of the standard C library to be loaded.
In other words, build libraries like this:
cc -c +z -I/<install_dir>/modeltech/include app.c ld -b -o app.sl app.oIf you receive the error "Exec format error" when the simulator is trying to load a PLI/VPI library, then you have most likely built under 11.0 and specified the
"-lc" option. Just rebuild without "-lc" (or rebuild on an HP-UX 10.0 machine).
Model Technology Incorporated Voice: (503) 641-1340 Fax: (503)526-5410 www.model.com sales@model.com |