PDA

View Full Version : Unable to compile project



vlad230
14th June 2012, 23:03
Hi guys,

I'm trying to compile a project I found online here: https://sites.google.com/site/mcvibot2011sep/home which uses QT, OpenCV and C++. I have followed all the installation steps (https://sites.google.com/site/mcvibot2011sep/download) mentioned for Windows but it still doesn't work.

The issue is that I get some strange errors like:
..\RotationalOffset\main.cpp(5) error: C1083: Cannot open include file: 'dirent.h': No such file or directory

My first guess is that this project needs to be compiled with mingw (which has an include directory with all the required .h files) using its g++ compiler but maybe it's using a different compiler?

Compiler output:


..\RotationalOffset\main.cpp(5) : fatal error C1083: Cannot open include file: 'dirent.h': No such file or directory
cl -c -nologo -Zm200 -Zc:wchar_t- -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtCore" -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\QtGui" -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include" -I"..\generalizedFourierDescriptor" -I"..\generalizedFourierDescriptorGray" -I"..\segmentation" -I"..\ihls_nhs" -I"..\post_processing" -I"..\rational_supershape_2d" -I"..\RotationalOffset" -I"..\RoadSignDetection" -I"..\3rdparty" -I"c:\OpenCV-2.3.1\install\include" -I"c:\OpenCV-2.3.1\install\include\opencv" -I"c:\OpenCV-2.3.1\install\include\opencv2" -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\include\ActiveQ t" -I"debug" -I"." -I"c:\QtSDK\Desktop\Qt\4.8.1\msvc2010\mkspecs\win32-msvc2010" -Fodebug\ @C:\Users\Sergiu\AppData\Local\Temp\RoadSignDetect or.obj.972.187.jom
RoadSignDetector.cpp


I would like to mention that I'm using Windows 7, Qt Creator 2.4.1 and I am very new to QT.

I've also tried to specify another include path in the .pro file to the include folder C:\QtSDK\mingw\include\ but I get a lot of errors like it doesn't recognize the elements from the header files.

Any ideas on why I can't compile this?

Please help,
Vlad

ChrisW67
15th June 2012, 00:17
You are using the Microsoft C++ compiler. Assuming you have installed the MingW components of the Qt SDK you should just be able to change the build settings in Qt Creator (See Projects on the left tool bar). If you have not installed the MingW Qt library binaries then you can do so using the SDK Maintenance Tool

vlad230
16th June 2012, 14:08
Thanks a lot! That was it!
I didn't have the MinGW compiler installed.

Thanks again,
Vlad