running a project in Dev c++

南楼画角 提交于 2019-12-07 07:20:49

问题


I have a folder that contains a few .h and .cpp files along with a makefile. How can I run them in dev C++. I have just started using dev C++, hence, a bit clueless about this. the make file is

 CC=g++
 CV=-I/usr/include/opencv
 CV2=-lml -lcvaux -lhighgui -lcv -lcxcore

 all:
    $(CC) main.cpp HOG.cpp HOGFeaturesOfBlock.cpp $(CV) $(CV2) -o featureExtractor

and I'm getting the error main.cpp, hog.cpp: no such file or directory.


回答1:


  • Create a new project using File >> New Project. You can ignore the C/C++ options if you use a custom makefile. Also, an empty project will do.
  • Add the source and header files to the new project using Project >> Add to Project or the '+' sign in the middle of the top toolbar.
  • Go to Project >> Project Options (Alt+P) >> Makefile and tick the 'Use custom makefile' option. Then point Dev-C++ to the custom makefile below.

Also, be sure to update your IDE to the following version, which fixes an immense list of bugs compared to the ancient 4.9.9.2 version, ships with GCC 4.6.1 or 4.7.0, and is fully portable: http://sourceforge.net/projects/orwelldevcpp/



来源:https://stackoverflow.com/questions/13544684/running-a-project-in-dev-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!