Include torch.h land Indexing in eclipse


I was wondering how can I use eclipse to debug and run a C++ code that includes <torch/torch.h>, without Cmake? Currently, I am able to use Cmake through command line to debug any code, but I have some difficulty with ecplise. For adding a new library in eclipse I need to involve so file of torch in the make statement, and as a result I added libtorch/lib/ in the library path. But, still eclipse does not find the library and so file.
Is there any help for that? I have an installed pytorch-C++ on Ubuntu.
I appreciate any help and comments.


1 Like

You probably have to set the correct include and library paths, i.e. /path/to/libtorch/include somewhere?

I tried all, but it did not work. Now, I gave up the idea of not using CMake.
I am able to create an eclipse project with CMake and import the project in eclipse. But, the problem is that once I enter the debug mode, I lose all torch indexing. I tried index->rebuild, but it did not help. Indeed, I noticed that, during the indexer rebuild, some progress bar was shown, and now, when I execute the index->rebuild, the progress bar is not shown. I did not changed any project/workspace/index settings, at least not on purpose anyway. I searched about this and the only solution that I found suggests to delete the project and create it again, which does not make sense. I need to add that I still can build and run the project.

All that I explained happened in Linux. The weird point is that in Windows I do not have any problem with indexing, but it just does not work. I mean it is built, but does not run. I have explained this problem in

I appreciate any help and comment.