Cannot open source file “iostream” while using remote debug in Visual Studio 2017









up vote
-1
down vote

favorite
1












Project type: visual c++ console application(linux)



Project properties:
the is the debugging configure:
the is the debugging configure



VC+ Directories: D:codingcheaderusrinclude;



I want to program in Visual Studio and debug on Linux via remote debug.
The test code is:



#include <iostream>
using namespace std;
int main()

cout << "j" << endl;
return 0;



Before building it, I have followed the Visual Studio's Docs here.



I copied all file in /usr/include to my computer.



After click build I get error about cannot open source file iostream but I can still get correct output from Linux console window.



this is the screenshot



I searched this problem by Google, I found some answers and test those methods which I thought maybe useful for me.
I open a new Windows console application (not Linux) project, and check the difference between them



I copy the Include Directories: $(VC_IncludePath);$(WindowsSDK_IncludePath);



Also the Excutable Directories: $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)SysWow64;$(FxCopDir);$(PATH);



But this method didn't work.










share|improve this question























  • To nitpick: If you're using the full Visual Studio environment, then you're by definition not programming "within linux [sic] environment". You could be programming for a Linux target using a cross-compiler, but you're still not in a Linux environment (as Visual Studio only runs in Windows).
    – Some programmer dude
    Nov 11 at 15:17






  • 1




    And to help you with your problem, first please read about how to ask good questions, as well as this question checklist. Then please improve your question with all details, like how you configured your environment and what compiler you're using etc.
    – Some programmer dude
    Nov 11 at 15:18










  • sorry,my English is bad, I want to express that I want to write code in windows but debug&run the output file on linux
    – moyuan jiang
    Nov 11 at 15:22










  • OK, I will see those articles and edit my quetions , sorry
    – moyuan jiang
    Nov 11 at 15:24














up vote
-1
down vote

favorite
1












Project type: visual c++ console application(linux)



Project properties:
the is the debugging configure:
the is the debugging configure



VC+ Directories: D:codingcheaderusrinclude;



I want to program in Visual Studio and debug on Linux via remote debug.
The test code is:



#include <iostream>
using namespace std;
int main()

cout << "j" << endl;
return 0;



Before building it, I have followed the Visual Studio's Docs here.



I copied all file in /usr/include to my computer.



After click build I get error about cannot open source file iostream but I can still get correct output from Linux console window.



this is the screenshot



I searched this problem by Google, I found some answers and test those methods which I thought maybe useful for me.
I open a new Windows console application (not Linux) project, and check the difference between them



I copy the Include Directories: $(VC_IncludePath);$(WindowsSDK_IncludePath);



Also the Excutable Directories: $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)SysWow64;$(FxCopDir);$(PATH);



But this method didn't work.










share|improve this question























  • To nitpick: If you're using the full Visual Studio environment, then you're by definition not programming "within linux [sic] environment". You could be programming for a Linux target using a cross-compiler, but you're still not in a Linux environment (as Visual Studio only runs in Windows).
    – Some programmer dude
    Nov 11 at 15:17






  • 1




    And to help you with your problem, first please read about how to ask good questions, as well as this question checklist. Then please improve your question with all details, like how you configured your environment and what compiler you're using etc.
    – Some programmer dude
    Nov 11 at 15:18










  • sorry,my English is bad, I want to express that I want to write code in windows but debug&run the output file on linux
    – moyuan jiang
    Nov 11 at 15:22










  • OK, I will see those articles and edit my quetions , sorry
    – moyuan jiang
    Nov 11 at 15:24












up vote
-1
down vote

favorite
1









up vote
-1
down vote

favorite
1






1





Project type: visual c++ console application(linux)



Project properties:
the is the debugging configure:
the is the debugging configure



VC+ Directories: D:codingcheaderusrinclude;



I want to program in Visual Studio and debug on Linux via remote debug.
The test code is:



#include <iostream>
using namespace std;
int main()

cout << "j" << endl;
return 0;



Before building it, I have followed the Visual Studio's Docs here.



I copied all file in /usr/include to my computer.



After click build I get error about cannot open source file iostream but I can still get correct output from Linux console window.



this is the screenshot



I searched this problem by Google, I found some answers and test those methods which I thought maybe useful for me.
I open a new Windows console application (not Linux) project, and check the difference between them



I copy the Include Directories: $(VC_IncludePath);$(WindowsSDK_IncludePath);



Also the Excutable Directories: $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)SysWow64;$(FxCopDir);$(PATH);



But this method didn't work.










share|improve this question















Project type: visual c++ console application(linux)



Project properties:
the is the debugging configure:
the is the debugging configure



VC+ Directories: D:codingcheaderusrinclude;



I want to program in Visual Studio and debug on Linux via remote debug.
The test code is:



#include <iostream>
using namespace std;
int main()

cout << "j" << endl;
return 0;



Before building it, I have followed the Visual Studio's Docs here.



I copied all file in /usr/include to my computer.



After click build I get error about cannot open source file iostream but I can still get correct output from Linux console window.



this is the screenshot



I searched this problem by Google, I found some answers and test those methods which I thought maybe useful for me.
I open a new Windows console application (not Linux) project, and check the difference between them



I copy the Include Directories: $(VC_IncludePath);$(WindowsSDK_IncludePath);



Also the Excutable Directories: $(VC_ExecutablePath_x86);$(WindowsSDK_ExecutablePath);$(VS_ExecutablePath);$(MSBuild_ExecutablePath);$(SystemRoot)SysWow64;$(FxCopDir);$(PATH);



But this method didn't work.







visual-studio remote-debugging






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 16:55









Zoe

10.7k73575




10.7k73575










asked Nov 11 at 15:12









moyuan jiang

11




11











  • To nitpick: If you're using the full Visual Studio environment, then you're by definition not programming "within linux [sic] environment". You could be programming for a Linux target using a cross-compiler, but you're still not in a Linux environment (as Visual Studio only runs in Windows).
    – Some programmer dude
    Nov 11 at 15:17






  • 1




    And to help you with your problem, first please read about how to ask good questions, as well as this question checklist. Then please improve your question with all details, like how you configured your environment and what compiler you're using etc.
    – Some programmer dude
    Nov 11 at 15:18










  • sorry,my English is bad, I want to express that I want to write code in windows but debug&run the output file on linux
    – moyuan jiang
    Nov 11 at 15:22










  • OK, I will see those articles and edit my quetions , sorry
    – moyuan jiang
    Nov 11 at 15:24
















  • To nitpick: If you're using the full Visual Studio environment, then you're by definition not programming "within linux [sic] environment". You could be programming for a Linux target using a cross-compiler, but you're still not in a Linux environment (as Visual Studio only runs in Windows).
    – Some programmer dude
    Nov 11 at 15:17






  • 1




    And to help you with your problem, first please read about how to ask good questions, as well as this question checklist. Then please improve your question with all details, like how you configured your environment and what compiler you're using etc.
    – Some programmer dude
    Nov 11 at 15:18










  • sorry,my English is bad, I want to express that I want to write code in windows but debug&run the output file on linux
    – moyuan jiang
    Nov 11 at 15:22










  • OK, I will see those articles and edit my quetions , sorry
    – moyuan jiang
    Nov 11 at 15:24















To nitpick: If you're using the full Visual Studio environment, then you're by definition not programming "within linux [sic] environment". You could be programming for a Linux target using a cross-compiler, but you're still not in a Linux environment (as Visual Studio only runs in Windows).
– Some programmer dude
Nov 11 at 15:17




To nitpick: If you're using the full Visual Studio environment, then you're by definition not programming "within linux [sic] environment". You could be programming for a Linux target using a cross-compiler, but you're still not in a Linux environment (as Visual Studio only runs in Windows).
– Some programmer dude
Nov 11 at 15:17




1




1




And to help you with your problem, first please read about how to ask good questions, as well as this question checklist. Then please improve your question with all details, like how you configured your environment and what compiler you're using etc.
– Some programmer dude
Nov 11 at 15:18




And to help you with your problem, first please read about how to ask good questions, as well as this question checklist. Then please improve your question with all details, like how you configured your environment and what compiler you're using etc.
– Some programmer dude
Nov 11 at 15:18












sorry,my English is bad, I want to express that I want to write code in windows but debug&run the output file on linux
– moyuan jiang
Nov 11 at 15:22




sorry,my English is bad, I want to express that I want to write code in windows but debug&run the output file on linux
– moyuan jiang
Nov 11 at 15:22












OK, I will see those articles and edit my quetions , sorry
– moyuan jiang
Nov 11 at 15:24




OK, I will see those articles and edit my quetions , sorry
– moyuan jiang
Nov 11 at 15:24

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53250088%2fcannot-open-source-file-iostream-while-using-remote-debug-in-visual-studio-201%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53250088%2fcannot-open-source-file-iostream-while-using-remote-debug-in-visual-studio-201%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Barbados

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3