Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

* * * - - 1 votes

C and C++ on MS Visual Studio

visual studio c++ c++ c and c++

  • Please log in to reply
3 replies to this topic

#1 Ruzzar


    CC Lurker

  • New Member
  • Pip
  • 7 posts

Posted 21 August 2012 - 08:05 AM

Hey guys...

I've got a project in image processing(car detection). And I would like to do it in OpenCV using C language (not C++).

I'll be using MS Visual Studio IDE 2010 professional, although the project will have a .cpp source file(s), that would not necessarily mean it's in C++ (I think).

I just want clarification if OpenCV( version 2.3.1 or 2.4.1) will fully support C, since some files in OpenCV libraries are ' .cpp' already.

I think I would be able to manage this if I do it in c rather than ++.

I hope my question would make sense.

  • 0

#2 neil


    CC Addict

  • Senior Member
  • PipPipPipPipPip
  • 373 posts
  • Location:Philadelphia
  • Programming Language:C++, Perl, Bash
  • Learning:C, Java, C++, Python, JavaScript, Perl, Bash, Others

Posted 21 August 2012 - 11:20 AM

It looks like it should support C
  • 0

#3 Ruzzar


    CC Lurker

  • New Member
  • Pip
  • 7 posts

Posted 22 August 2012 - 06:21 AM

The introduction says modules in OpenCV 2.X and later are written in C++. With OpenCV 1.X
written in C.

And C language definitions seems to be highlighted in 'purplish' colour, with no explanation.
I'm more proficient in C than C++. I wouldn't want to be stuck in C++.

Open CV setup still giving some errors now in MSVS 2010 pro, so can't test yet...
  • 0

#4 dargueta


    I chown trolls.

  • Moderator
  • 4854 posts
  • Programming Language:C, Java, C++, PHP, Python, JavaScript, Perl, Assembly, Bash, Others
  • Learning:Objective-C

Posted 22 August 2012 - 10:02 AM

Are the declarations wrapped in something like:

#ifdef __cplusplus
extern "C" {

/* definitions in here */

  • 0

sudo rm -rf / && echo $'Sanitize your inputs!'

Also tagged with one or more of these keywords: visual studio, c++, c++, c and c++

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download