6

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.

Orwell
  • 1,468
  • 1
  • 13
  • 28
MasterWayne
  • 95
  • 1
  • 2
  • 6

1 Answers1

5
  • 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/

Orwell
  • 1,468
  • 1
  • 13
  • 28
  • @MasterWayne: eh, are you sure these files are put right next to the makefile? If not, please specify a relative path when you invoke gcc or g++. – Orwell Nov 24 '12 at 19:32
  • yes, the makefile is in the same folder as those files. What else could be wrong? – MasterWayne Nov 25 '12 at 05:24
  • @MasterWayne: try adding the '-c' flag before supplying the source files to GCC/G++. – Orwell Nov 25 '12 at 10:25