Question

I'm working with python within opengl project and writing my own gl library with C language. I use Sublime Text 2 and need build system for creating .so with pressing crtl-b.

Était-ce utile?

La solution

{
    "cmd": ["gcc -Wall -Werror -fPIC -c $file_name -o $file_base_name| gcc -shared -o $file_base_name.so  $file_base_name -lGLEW -lGL -lGLU -lglut"],
    "shell":true, 
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "working_dir" : "$file_path",
    "selector": "source.c"    
}

After launch build command in folder where is your .c file will appear two files. One with object code without extension and .so file, that you needed. For your own needs maybe you will need change libraries in linker shell command. I mean -lGLEW -lGL -lGLU -lglut on somethin that you need.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top