zhengthomastang/2018AICity_TeamUW

SPD_EST_IPL and APP_MDL_IPL compile error

Closed this issue · 3 comments

My evironment:
Hardware: NVIDIA Jetson TX!
OS: Ubuntu 16.04 for Tegra
OpenCV: 2.4.13 (OpenCV4Tegra)
CUDA:8.0

When I compile SPD_EST_IPL and APP_MDL_IPL, I have the following errors
(The error reports is too long, I just paste a part of them)

ubuntu@tegra-ubuntu:~/2018AICity_TeamUW-master_1/Track1/SPD_EST_IPL/SPD_EST_IPL/src$ g++ main.cpp 
main.cpp: In member function ‘void CTrkNd::setDetCls(char*)’:
main.cpp:37:75: warning: format not a string literal and no format arguments [-Wformat-security]
  inline void setDetCls(char* acDetCls) { std::sprintf(m_acDetCls, acDetCls); }
                                                                           ^
main.cpp: In function ‘cv::Point3f bkproj2d23d(cv::Point2f, float*, int)’:
main.cpp:123:76: error: no match for ‘operator/’ (operand types are ‘cv::Point3f {aka cv::Point3_<float>}’ and ‘int’)
  o3dPt = cv::Point3f(oMatM.at<double>(0, 0), oMatM.at<double>(1, 0), 0.0f) / nLenUnit;
                                                                            ^
ubuntu@tegra-ubuntu:~/2018AICity_TeamUW-master_1/Track1/APP_MDL_IPL/src$ g++ main.cpp 
...
main.cpp:487:2: error: ‘Rect2f’ is not a member of ‘cv’
  cv::Rect2f oBBoxf;
  ^
main.cpp:533:174: error: no matching function for call to ‘cv::RotatedRect::RotatedRect(cv::Point, cv::Point, cv::Point)’
 cv::Point((APP_MDL_NORM_SZ.width - 1), (APP_MDL_NORM_SZ.height - 1))), cv::Scal
                                                                     ^
...

Maybe I should update my OpenCV to 3.1 ?
I know little about C++, So if it's a stupid question, please forgive me.

Complete error report tmp_error.txt

Hi @kev1nming! Not sure if you have received my comments.

It looks like your compiler cannot link to OpenCV properly, or the OpenCV version is too old. Please use OpenCV 3.1+ as you suggested.

Besides, note that the C++ compiler in Visual Studio in Windows has some inconsistency in Linux. For example, the initialization of std::vector is not supported. You may follow the error messages to make corresponding changes. Let me know if you still have any problems.

Thank you for your comment. I'm sorry that I forgot to reply you yesterday. I will try your suggestions a few days later. If I have any new situation or problem, I will let you know.

It seems that I cannot compile code on my environment, so I think I should let my friend do this, Thank you again.