0

Hi,

I am trying to make a sublime text plugin that will compile some C code, but it uses python for these plugins. I already have a method of using g++ for single files, but I was wondering if anyone knows how to do it for a make file, here is the code for the g++:

import sublime, sublimeplugin, os
class cs(sublimeplugin.TextCommand):
	def run(self, view, args):
		a=view.fileName()
		f="g++ -o '"+a[:-2]+"' '"+a+"'"
		print f
		os.popen(f)

thanks in advance.

3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by leegeorg07
0

You might have to write some batch files to jump start the C compiler from within Sublime Text's Python extension language. Check with our friends in the C forum of DaniWeb.

0

Oh, OK thanks, I didnt think of that. I guess I should move the thread to C, I will mark this one as solved though.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.