Running C++ code in VC++.Net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter Krikelis

    Running C++ code in VC++.Net

    Hi,

    I have a C++ code. I tried to open and run in in VC++.Net
    and it gave me an error: fatal error C1083: Cannot open
    include file: 'getopt.h': No such file or directory

    Somehow it did not find the standard C++ library. And the
    question is what do I need to do in order to run the C++
    code in VC++.Net and get it working or can I do it at all.
    What should I do with the not found getopt.h library?

    Thatnks in advance,

    Peter

  • Andrew Burlak

    #2
    Re: Running C++ code in VC++.Net

    getopt.h is not a standard C++ header, it's a POSIX header.

    To get it working you need an UNIX compatibility layer, such as Cygwin
    (http://www.cygwin.com)

    ---
    Andrew Burlak.


    "Peter Krikelis" <pkrikelis@hotm ail.com> wrote in message
    news:50c901c37d 1b$a57e1b40$a50 1280a@phx.gbl.. .[color=blue]
    > Hi,
    >
    > I have a C++ code. I tried to open and run in in VC++.Net
    > and it gave me an error: fatal error C1083: Cannot open
    > include file: 'getopt.h': No such file or directory
    >
    > Somehow it did not find the standard C++ library. And the
    > question is what do I need to do in order to run the C++
    > code in VC++.Net and get it working or can I do it at all.
    > What should I do with the not found getopt.h library?
    >
    > Thatnks in advance,
    >
    > Peter
    >[/color]


    Comment

    • Yan-Hong Huang[MSFT]

      #3
      RE: Running C++ code in VC++.Net

      Hello Peter,

      Thanks for posting in the group.

      Andrew is right. The error message has shown the reason of the problem.
      VS.NET couldn't find that header file. It is not a standard header file
      included in VS.NET. getopt is a function in Posix system. Andrew has
      introduced a method. Here I'd like to introduce another MSDN artilce in
      this area:
      "UNIX Application Migration Guide"
      Learn with interactive lessons and technical documentation, earn professional development hours and certifications, and connect with the community.


      Does that answer your question?

      Best regards,
      Yanhong Huang
      Microsoft Online Partner Support

      Get Secure! - www.microsoft.com/security
      This posting is provided "AS IS" with no warranties, and confers no rights.

      --------------------
      !Content-Class: urn:content-classes:message
      !From: "Peter Krikelis" <pkrikelis@hotm ail.com>
      !Sender: "Peter Krikelis" <pkrikelis@hotm ail.com>
      !Subject: Running C++ code in VC++.Net
      !Date: Wed, 17 Sep 2003 06:00:19 -0700
      !Lines: 15
      !Message-ID: <50c901c37d1b$a 57e1b40$a501280 a@phx.gbl>
      !MIME-Version: 1.0
      !Content-Type: text/plain;
      ! charset="iso-8859-1"
      !Content-Transfer-Encoding: 7bit
      !X-Newsreader: Microsoft CDO for Windows 2000
      !Thread-Index: AcN9G6V++s9J7Oo +Sp+Ng+L3wKjLMw ==
      !X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
      !Newsgroups: microsoft.publi c.dotnet.langua ges.vc
      !Path: cpmsftngxa06.ph x.gbl
      !Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.vc:28395
      !NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
      !X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vc
      !
      !Hi,
      !
      !I have a C++ code. I tried to open and run in in VC++.Net
      !and it gave me an error: fatal error C1083: Cannot open
      !include file: 'getopt.h': No such file or directory
      !
      !Somehow it did not find the standard C++ library. And the
      !question is what do I need to do in order to run the C++
      !code in VC++.Net and get it working or can I do it at all.
      !What should I do with the not found getopt.h library?
      !
      !Thatnks in advance,
      !
      !Peter
      !
      !

      Comment

      Working...