Coder Social home page Coder Social logo

Error in header files. about cardetect HOT 12 CLOSED

skandhurkat avatar skandhurkat commented on July 30, 2024
Error in header files.

from cardetect.

Comments (12)

skandhurkat avatar skandhurkat commented on July 30, 2024

Hi,

I don't see any files in the report. Could you write the file names again? Also, where are these files referenced.

Thanks.

from cardetect.

RickVedrine avatar RickVedrine commented on July 30, 2024

Hi Skandhurat,

Sorry, I forget to mention the header file names.

Please find below the mentioned header files. I am using OpenCV 2.4.5 version, but I don't think the below mentioned problem is related with Opencv.

#include "thread"
#include "mutex"
#include "getopt.h"

Due to the above files, there are errors occurring in the program. Please guide me where to find the above mentioned file. I have downloaded you source code an exactly uploaded in visual studio. But there are errors due to above file.

Errors:

  1. error C2668: 'ceil' : ambiguous call to overloaded function
  2. error C1083: Cannot open include file: 'thread': No such file or directory

from cardetect.

skandhurkat avatar skandhurkat commented on July 30, 2024

"thread" and "mutex" are part of the C++11 standard. To use these files, you'll need GCC >= 4.7, or MS Visual Studio > 2010 (I believe). The last time I checked, MingW did not support threads on Windows. You can go to the Woe32 branch for an older version that uses Win32 threads instead of C++11 threads.
"getopt.h" is used for parsing input arguments, and the only place it's used is in the main() function. Getopt is the standard way to parse input arguments, and provides a very clean interface, which is perhaps why VS does not support it. :)
I think that there are some ports for getopt for Visual Studio, otherwise, you can delete the getopt related code in main(), and write your own argument parsing routine.

from cardetect.

RickVedrine avatar RickVedrine commented on July 30, 2024

Hi Skand,

The problem for getopt.h header file is solved but I am still confused with the above explanation because I am new towards C++. Could you tell me some steps what to do with the rest of two files mutex and thread. Sorry, for my silly questions.

from cardetect.

skandhurkat avatar skandhurkat commented on July 30, 2024

Let's go through this step by step:

  1. What compiler are you using
  2. What's the version
  3. What steps did you use to solve the getopt.h problem.

from cardetect.

RickVedrine avatar RickVedrine commented on July 30, 2024

C++. I am using Visual Studio 2010. I searched out for getopt.h and found downloadable header file.

from cardetect.

skandhurkat avatar skandhurkat commented on July 30, 2024

Please use the files from the Woe32 branch. I haven't built a CMake build system for that branch yet, but you should be able to just replace files from Woe32 into master.

from cardetect.

RickVedrine avatar RickVedrine commented on July 30, 2024

Alright, let me give a try.

from cardetect.

RickVedrine avatar RickVedrine commented on July 30, 2024

I tried editing the code but in vain.

from cardetect.

skandhurkat avatar skandhurkat commented on July 30, 2024

I am leaving this issue open. Will try to issue a fix over this weekend.

from cardetect.

skandhurkat avatar skandhurkat commented on July 30, 2024

Fixed the Woe32 branch to use CMake. I've also added another project getopt-for-Visual-Studio. Try compiling the Woe32 branch again.

Let me know if this fixes the issues you've been having.

from cardetect.

skandhurkat avatar skandhurkat commented on July 30, 2024

Closing issue because there has been no activity for a month.

from cardetect.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.