I'm learning OpenGL these days and I'm compiling it from the command line (I do not want to use the IDE because I 'Used for VIM). It may be a hassle to compile the OpenLeal files, say that I have a file named hello CPP to quickly compile and run:
G ++ - Framework GLUT-Fraimaker OpenGL - FrameMarkCoCo Hello .cpp & amp; ./a.out Since I'm learning OpenGell, I will test with several different files and it is not possible for me to type the above command all the time. Everything I need is something:
some_command% & amp; ./a.out some_command is some of the most commonly used (like G ++, make), and% filename, is the best.
I think Macfill is a possible solution, so I went ahead and learned about makefiles, but it works for a specific name; There are but still it seems very difficult for me (I have to type manually - ARGUMENT = filename in the part).
In addition to this, I think the shell script can be a good solution. The only fallback is that I have to self-define a name for shell-script.
I want to know that there is a better way for me to compile and run OpenCL CPP files quickly
Thanks a lot.
I think you want to be able to do something like this:
create foo (say, from vim ), where foo is the basis of the source file that you are using Varies on For example:
CFS = G ++ CFFSFGS = - Framework GLUT-Framework OpenGL-Framework Cocoa%:% .cpp $ (CXX) $ (CFGFLAGS) -o $ @ $ & lt; ./$@
You should allow to run Hello and it will be: - An executable to
In the current directory (if Hello.cpp has changed). - Run
Hello for you, if it has been decided to compile and the compilation is successful.
No comments:
Post a Comment