How to link to cublas library in eclipse Nsight?

亡梦爱人 提交于 2019-12-06 13:18:07

I don't think any of this is specific to Nsight Eclipse Edition. What you are trying to do are standard operations for any C/C++ project built using Eclipse. Nsight EE doesn't change these steps in any major way. You can get help easily enough on these topics using the built-in Eclipse help in Nsight EE. For example:

  • open help (select help...help contents)
  • in the search box type "add library"
  • click on the first item returned in the help search pane

All of your questions (adding library paths, adding libraries, adding include paths) have to do with the Project Properties. We can access these properties directly by:

  • Open the project in Nsight EE
  • In the project pane on the left, right-click on the project whose properties you wish to inspect/modify, then select "Properties" from the pop-up menu (the last item in the menu)
  • The project properties pane is now open.
  • Click on the triangle next to "General" in the properties dialog. This will open the "General" sub-menu.
  • Under General, click on "Paths and Symbols" The generic Eclipse help would have taken you this far.
  • Now click on "CUDA C" (Yes this is the one step that is different.)
  • The tabs across the top now include selections for things like "Includes", Libraries", "Library Paths" etc. By selecting any one of these tabs, you can add or modify the appropriate entries.
  • So as one example, let's add the cublas library. Select the "Libraries" tab.
  • Now click the "Add" button
  • Enter the name of the library. It is cublas, not lcublas, and not -lcublas
  • now click "OK", "Apply" and exit out of the properties, build your project, and confirm that -lcublas has been added to the build command
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!