473,671 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Nov 16 '05 #1
2 5415
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" <pk*******@hotm ail.com> wrote in message
news:50******** *************** *****@phx.gbl.. .
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

Nov 16 '05 #2
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"
http://msdn.microsoft.com/library/en...asp?frame=true

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" <pk*******@hotm ail.com>
!Sender: "Peter Krikelis" <pk*******@hotm ail.com>
!Subject: Running C++ code in VC++.Net
!Date: Wed, 17 Sep 2003 06:00:19 -0700
!Lines: 15
!Message-ID: <50************ *************** *@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
!
!

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

143
8023
by: suri | last post by:
Hello I downloaded glibc and tried looking for the code that implements the sine function i couldnt find the file. i went to the math directory and found math.h.. i guess that needs to be included for the sine function. but which .c file implements the sine/cosine and other trig fns thanks
1
1125
by: tcbrock | last post by:
I'm running Visual Studio 97 (vc++ 5.0) on Windows XP SP2 and when I run my program from inside the development environment, and then I quit it, it goes back to VC, but sometimes if I hit CTRL-ALT-DEL and look at my processes running, there is my program! Which can stop it from linking or running successfully until I kill it in there. Has anyone else seen this? It's just started happening to me in the last few months.
4
2101
by: duzinga | last post by:
I am trying to have a server program that runs at startup and accepts several commands from the clients. One of the commands is to play an audio file. I am using Microsoft.DirectX.AudioVideoPlayback.Audio class for that purpose. My problem is whenever I send a command to the program windows gives an error related to the directX, and shuts down the program. However if I run the program manually after the startup it works just fine. I have...
0
993
by: Abubakar | last post by:
Hi, I have made a visual c++ 2k5 unmanaged (consisting of WTL) app in windows 2000. Built it as "release". Its just not running on a windows xp machine. the error is: --------------------------- winproj.exe - Application Error --------------------------- The application failed to initialize properly (0xc0150002). Click on OK to terminate the application. ---------------------------
5
1662
by: plmanikandan | last post by:
Hi, I have written a win32 console application(exname1.exe) which runs for ten minutes.I am calling this exname1.exe from another exe named exname.exe using shellexecuteex.Now from exname.exe coding i have to check whether exname1.exe is already running or not.How to find whether a win32 console application is already runing or not from another win32 console application.I need only one copy of exe has to run(for that i have already used...
2
1399
by: Fiddelm3742 | last post by:
Well, I dont exactly know if there was a change in how Console Application projects are run/compiled from VS2003 to 2005 or what, but I have an application (mostly C) that used to run in about 2 minutes and now runs in hours. The output of the program seems the same, but the time it takes it run is ridiculous. Yes, I get the general warnings when I compile to use the now more secure functions fopen_s instead of fopen, etc. but no errors...
1
1536
by: akjohn | last post by:
My code compiles fine using VC++ 2005 and also with g++/gcc 3.4.2 (mingw...which came with the bloodshed dev c++ ide). But it only the vc++ build works correctly, the gcc exe starts but hangs...suggesting some memory problem. On building it with gcc 3.4.4 on red hat linux, I get a seg fault. I'm wondering why my code works fine with vc++ and not with g++/gcc. Are there are any flags I can set in gcc to make it work ok ?. I'm coding on...
5
2492
by: Zytan | last post by:
I cannot stand being unable to change the code while the debugger is running. Is there a way to do this? thanks, Zytan
4
5018
by: =?Utf-8?B?UHVjY2E=?= | last post by:
Hi, I'm using vs2005, .net 2 for a C# windows application. I'm preparing a installation package and I want to add the vcredist_86.exe to my installation. I add this exe file to my Application Folder of the setup proejct. I then add this file to the Custom Action's Install node. I set the InstallaerClass to False and delete the "/Install" fro the Arguments field. I got an error message when I run my setup at the target win2k server. ...
0
8402
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8927
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8825
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7445
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6237
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5703
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2819
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.