# \#system-verilog-package-compilation

**URL:** https://verificationacademy.com/forums/tag/system-verilog-package-compilation/5255.md

[Latest](https://verificationacademy.com/forums/latest.md) · [Categories](https://verificationacademy.com/forums/categories.md) · [Tags](https://verificationacademy.com/forums/tags.md)

---

## [Define from one package are visible in another package](https://verificationacademy.com/forums/t/define-from-one-package-are-visible-in-another-package/34298)

<div class="topic-metadata">

**Author:** [@bhupesh.paliwal](https://verificationacademy.com/forums/u/bhupesh.paliwal)\
**Replies:** 7\
**Last updated:** [April 20, 2022, 5:25pm UTC](https://verificationacademy.com/forums/t/define-from-one-package-are-visible-in-another-package/34298 "2022-04-20T17:25:47Z")

</div>

For a change, I am posting query for thing which seems working when I didn’t expected them to. defs.d: \`define WIDTH 3 p1.sv: package p1; \`include “defs.d” endpackage file.sv: bit\[\`WIDTH-1:0\] var; p2.sv: packag…

---

## [Compilation & package](https://verificationacademy.com/forums/t/compilation-package/30843)

<div class="topic-metadata">

**Author:** [@withankitgarg](https://verificationacademy.com/forums/u/withankitgarg)\
**Replies:** 5\
**Last updated:** [July 9, 2015, 5:56am UTC](https://verificationacademy.com/forums/t/compilation-package/30843 "2015-07-09T05:56:35Z")

</div>

Below are the 2 cases . Case 1 works fine but getting error in case 2 . Case 1 : File Name : pkg1.sv package pkg1; class abc1; int x=1; task access(); x++; endtask endclass endpackage File…
