开发者

CDT Custom Build

I have a class in my project which I need to compile using an external tool, and the output of that is a .cpp file.

I've tried right clicking the .h file I want to pass to the external tool, selected properties -> C++ Build -> Settings and have added the command and the output as shown in the image below;

CDT Custom Build

When I build the project, It does not call the command as passed and therefore cannot get the output generated. I have tried the command via terminal and works, I wan开发者_JS百科t to be able to get eclipse to pass the command when I select Project-> Build or Clean. Do anyone knows what I am doing wrong?

I have then added the full path to myclass.h in the command like this ~/Document/project/myproj/src/myclass.h. Now when I try 'Clean or Build' I end up with the error message ;

**** Build of configuration Debug for project myproj ****

make all make: No rule to make target src/member.o, needed by myproj. Stop.


Solved this issue by doing ../src/myclass.cpp and ../src/myclass.h for both command and output.

And then created a Target build through "Project"->"Make Targets"->"Create". In "Target Name" typed in something like boot2, and then uncheck the "Same as the target name". Entered the name of the generated file with the '../src/myclass.h'. Click "Ok" to close the dialog.

And then clicked on "Project"->"Make Targets"->"Build" select boot1 and the class was generated successfully.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜