Sublime Forum

[Error 5] Access is denied

#1

[quote][Error 5] Access is denied
[cmd: [u’g++’, u’C:\\Users\\administrator\\Desktop\\test.cpp’, u’-o’, u’C:\\Users\\administrator\\Desktop/test’]]
[dir: C:\Users\administrator\Desktop]
[path: C:\Program Files\AMD APP\bin\x86;C:\Ruby193\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Windows Live\Shared;C:\Program Files\Heroku;C:\Program Files\git\bin;C:\Program Files\git\cmd;C:\Android\sdk\platform-tools;C:\Program Files\Git\cmd;C:\Program Files\QuickTime\QTSystem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Python27;C:\Python27\Scripts;C:\Python27\Lib\site-packages;C:\Program Files\Mercurial;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files\Google\google_appengine;C:\cygwin\bin;]
[Finished][/quote]

This is my first time running C++ on ST2. Currently I have a problem as stated above. I tried reinstalling the installer as admin, ran the program as admin, but still to no avail. I’m using cygwin’s gcc compiler. Anyone can provide me a solution?

Seems like Windows does not handle symlinks.

Update: Solved. Now how do I run the .exe automatically after I’ve compiled the code? Currently, my C++.sublime-build is like this:

[code]{
“cmd”: “C:/cygwin/bin/g++”, “${file}”, “-o”, “${file_path}/${file_base_name}”],
“file_regex”: “^(…^:]):([0-9]+):?([0-9]+)?:? (.)$”,
“working_dir”: “${file_path}”,
“selector”: “source.c, source.c++”,

"variants":

	{
		"name": "Run",
		"cmd": "bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
	}
]

}
[/code]

Update #2:

[code]{
“cmd”: “C:/cygwin/bin/g++”, “${file}”, “-o”, “${file_path}/${file_base_name}”],
“cmd”: “${file_path}/${file_base_name}”],
“file_regex”: “^(…^:]):([0-9]+):?([0-9]+)?:? (.)$”,
“working_dir”: “${file_path}”,
“selector”: “source.c, source.c++”,

"variants":

	{
		"name": "Run",
		"cmd": "bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
	}
]

}
[/code]

0 Likes