Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
492 views
in Technique[技术] by (71.8m points)

c++ - VS 2019 (Visual studio) Linux makefile project - 'No such file or directory' when compiling from windows

I have a makefile projects on Linux (CentOS). The projects are compiled fine when compile from the Linux terminal. I added those projects to visual studio 2019. The connection is fine (files are copied to linux). I defined the remote working folder and project folder, and type of project (Makefile- static library). But, when compiling from the VS it is complaining he can't find include files (personal files from other projects). The folders and files ofcourse exists both on the windows and the Linux. The VS intelisense finds the files. I had environment variable that holds path and used in the Makefile. I changed the Makefile to have direct path and still files weren't found. I added prebuild event to echo the environment variable and it write it is not set. What else can be done/defined/configured....? Thanks.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Thanks for another different case which suggested to look at the command sent to the linux. I saw that the problem was actually that I missed replacing some of the '' with '/' in some of the paths. (This is difference between windows and Linux). i.e: in windows path:

C: Folder1Folder2Folder3 ------> /home/user/Folder1/Folder2/Folder3

this is on the Linux


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...