Link to home
Start Free TrialLog in
Avatar of panJames
panJames

asked on

Windows Form application and "#include <stdlib.h>"

Hello experts,

I want to add #include <stdlib.h> to my windows form application.

I get lots of errors:

c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(234) : error C3083: 'vc_attributes': the symbol to the left of a '::' must be a type
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(234) : error C2039: 'YesNoMaybe' : is not a member of '`global namespace''
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(234) : error C2146: syntax error : missing ';' before identifier 'SA_YesNoMaybe'
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(234) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(234) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(235) : error C3083: 'vc_attributes': the symbol to the left of a '::' must be a type


Why is that?

Thank you

panJames

Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

That header is deprecated, you should use "#include <cstdlib>"
Avatar of panJames
panJames

ASKER

Ok, added it.
This is how the beginning of my file looks like:

#pragma once


namespace OpenCVtester {

      using namespace System;
      using namespace System::ComponentModel;
      using namespace System::Collections;
      using namespace System::Windows::Forms;
      using namespace System::Data;
      using namespace System::Drawing;

      #include <cstdlib>
      #include "Headers.h"

And I get errors like:
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(234) : error C3083: 'vc_attributes': the symbol to the left of a '::' must be a type
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(234) : error C2039: 'YesNoMaybe' : is not a member of '`global namespace''
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(234) : error C2146: syntax error : missing ';' before identifier 'SA_YesNoMaybe'
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(234) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(234) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(235) : error C3083: 'vc_attributes': the symbol to the left of a '::' must be a type
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(235) : error C2039: 'YesNoMaybe' : is not a member of '`global namespace''
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(235) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(235) : error C2146: syntax error : missing ';' before identifier 'SA_Yes'
c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(235) : error C2377: 'OpenCVtester::YesNoMaybe' : redefinition; typedef cannot be overloaded with any other symbol
        c:\program files\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(234) : see declaration of 'OpenCVtester::YesNoMaybe'



panJames
ASKER CERTIFIED SOLUTION
Avatar of evilrix
evilrix
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial