compiler construction - Can't build C++ program using Sublime Text 2, Windows 8 -
I think many of you are using or using the Sublime Text 2 editor on Windows 8. I have a strange error: C ++ programs can not be created. My goal is to create simple programs and run simple programs, so that it can show me the output, Xcode or Codeblocks style in the bottom window.
My C ++ Sublime-build (which is the default setting): "$ {file}", "-o", "$ {file_path} / $ {file_base_name}"], "", "File_regex": "(^ [^:] * ): ([0-9] +):? ([0- 9] +)?:? (? *) $ "," Work_dird ":" $ {"", "selector": "source.c, source .c ++ "," variant ": [{" name ":" run "," cmd ": [" bash "," -c "," g ++ "$ {file} '-o' $ {file_path } / $ {File_base_name} '& amp; amp;' $ {File_path} / $ {file_base_name} '"]}]}
When I compile a simple hello world program, it runs compile and runs fine, and outputs on the lower panel of sublime text Shown, just like I want.
But if I run a more complex program such as:
// main.cpp / longest running results #include & lt; Iostream & gt; # Include & lt; Vector & gt; #include & lt; Limits & gt; using namespace std; Int main (int argc, const char * argv []) {int n; Cin & gt; & Gt; N; Of vector & lt; Int & gt; Nums (n); Of vector & lt; Int & gt; Lis_so_far (n); Int final_longest = 1; {Cin & gt; for int i = 0; i & lt; n; i ++) & Gt; Nums [i]; Lis_so_far [i] = 1; } Int so_far; For (int j = n-1; j & gt; = 0; j--) {so_far = 0; {// cout & lt; for Intuit = J + 1; I & lt; n; i ++) & Lt; "Hello" & lt; & Lt; Endl; If (nums [i]> gt; nx [j]) {// cout & lt; & Lt; "Hello" & lt; & Lt; Endl; If (lis_so_far [i]> so_far) {so_far = lis_so_far [i]; // cout & lt; & Lt; So_far & lt; & Lt; Endl; }}} If (j & l; n-1) {lis_so_far [j] + = so_far; If (lis_so_far [j]> gt; final_lag) {final_longest = lis_so_far [j]; }}} For (int i = 0; i & lt; n; i ++) {cout & lt; & Lt; Lis_so_far [i] & lt; & Lt; Endl; } Cout & lt; & Lt; Last_sxtension & lt; & Lt; Endl; Return 0; } , it gives me a random limit. Error, even if I have a Sigwin installed. Where CT2 is not considered a C ++ library ?:
c: \ user \ leonardo \ desktop \ main5.cpp: 11: limitations: there is no such file or directory [ Exit Code 6.5 in the end of code 1] If I include the #range limit, it creates it, but when I run it, I get a permission denied error , Even if no one is running the command prompt:
/ cygnus / cygwin-b20 / h-i586- Cygwin32 / i586-cygwin32 / bin / ld: can not open the output file C: \ Users \ Leonardo \ Desktop / main5. Exe: Permission denied collection 2: ld 1 exit status Any ideas? I just want CT2 to work as xodod or codeballs. Error denied permission: Check the Task Manager if the program is running (see procedures).
Unavailable headers: Your compiler (G ++) should know where it can be found, not a text editor. I think that you & lt; Climits & gt;
Comments
Post a Comment