libvcsnew.so: undefined reference to

文章目录

  • 问题描述:
  • 解决方案:


问题描述:

在利用vcs进行仿真的时候,遇到如下 “libvcsnew.so: undefined reference to xxxxxx" 这种报错,这里提供解决方法。

/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `vfs::vfsReleaseVirtualFileList(VFILE_LIST*)'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `ZsGetDfsInstId'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `snpsCheckCallocFromGroupFunc'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `ZsFinalize'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `vfs_feof'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `snps_mem_named_push_context'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `vfs_fflush'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `vfs_fseek'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `snpsGroupSize'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `vfs_enable_multi_process_support'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `snps_mem_get_current_group'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsucli.so: undefined reference to `storeMiscTfCb'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `snpsHighMemory'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `vfs::vfsGetVirtualFileList(char const*, char const*, int)'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `snpsStrdupFunc'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `vfs::fseek(vfs::CFile*, long, int)'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `ZsGetValueLocation'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsucli.so: undefined reference to `shutDownNativeUcli'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `snps_mem_unmap_freed_pages'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `vfs_cleanup'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `snpsCallocFromGroup'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsucli.so: undefined reference to `isUcliEngineStarted'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `vfs::mfprintf(vfs::CFile*, char const*, ...)'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `ZsExecuteNBAs'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `snps_mem_set_out_of_memory_routine'
/opt/synopsys/vcs_vO-2018.09-SP2/linux64/lib/libvcsnew.so: undefined reference to `vfs_fwrite'

解决方案:

在vcs命令后面加入选项 -LDFLAGS -Wl,--no-as-needed。(不要拷贝这里,编辑器显示有问题,拷贝下面代码区的代码)

vcs -full64 -cpp g++-4.8 -cc gcc-4.8 -LDFLAGS -Wl,--no-as-needed

你可能感兴趣的:(随笔)