Member Avatar for OzY360

Hi i am doing C programming in netbeans and when i compile and run my program i get a message in the dos console that says i need to use the nodosfilewarning to disable the cygwin warning i am getting. I have attached a screenshot as it is a rather lengthy message to type out. I know that you have to put this variable into the batch file in C:/Cygwin/Cygwin.bat. It doesn't work though, maybe I am doing something wrong? Any guidance that you guys can offer would be much appreciated. Also, can you guys recommend me some good compilers other than bloodshed (dev c++) or MS visual studio that are free and are compatible with Windows Vista/7? Cheers.

> MS visual studio
Visual Studio express IS free.

As for the error message, can we assume that you read the URL in the error message?

Member Avatar for OzY360

yep lol i read the url and i've looked at the rather lengthy documentation for cygwin. I have the professional edition of visual studio but don't fancy it much but i guess it will have to do.

Add an environment variable named CYGWIN with value nodosfilewarning and the error message will be gone.

Member Avatar for OzY360

Can you show me how to do this properly? I know that even if a single semi colon is out of place it will not work. I know that you go to Start > Control Panel > System > Environment Variables and then you click add in system variable. I need to know exactly what values to add. Also how do i add the nodosfilewarning variable to the Cygwin variable?

Under system variables, click on New, set variable name to CYGWIN and set value as nodosfilewarning and you're done.

i have the same problem, entering the values to system variables didn't solved my problems?
edit: sorry for my stupidity after restarting netbenans, the problem has gone

I have done everything you suggested, but it didn't help.

I have set variable name to CYGWIN and its value to nodosfilewarning restarted NetBeans and ... message still appears.

Also I have added this line to cygwin.bat

set CYGWIN=nodosfilewarning

still error appears

Member Avatar for OzY360

haha sorry mate ive completely forgotten how i did it and i cant even go back and refer to my own environment variables coz i did a clean install of windows 7 over my triple boot (xp, vista, Ubuntu). I dont beleive u have to do anything with the .bat file but add a new system variable called CYGWIN and give it a value of nodosfilewarning=0. I think you have to add a path to it as well in the system variables. You should already have a variable called PATH if you use netbeans and command line (CMD if ur using windows - java & javac). So under path you would put a semi colon after whatever is there and then add the path to wherever you have installed cygwin. Please let me know if you want me to clarify anything :)

Thanks for your reply. But still im getting error.

Actually before your post I haven't added to path variable cygwin directiry. I have added it, C:\cygwin by default isnn't it? But still not working. Also I figured out that value for my cygwin variable was without =0, I have added it but still nothing (

Member Avatar for OzY360

Very strange... im not sure whats wrong then mate. As a last resort you could just get a linux distro like ubuntu and install it in vmware if you dont want to partition your hard drive and install ubuntu on there. The terminal built in there will give you much better functionality than what cygwin is designed to do (emulate unix shell). Also if you have linux installed and you want to access the terminal without booting it up you can do this remotely using SSH in Putty. Every thing i have mentioned here is completely free and its worth getting to know the various tools that are available out there :) Finally, if you have a mac you can just use the terminal built into mac os since its unix all the commands will work. You probably would only need commands like gcc, ./a.out, java, javac etc....

simply:
set CYGWIN=nodosfilewarning
and you are done

Here are the relevant entries:

# base-files version 3.9-3

# WARNING
#
# IF THIS bash IS MODIFIED IT WILL NOT BE UPDATED BY THE CYGWIN
# SETUP PROGRAM.  IT BECOMES YOUR RESPONSIBILITY.
#
# The latest version as installed by the Cygwin Setup program can
# always be found at /etc/defaults/etc/bash.bashrc

# System-wide .bashrc file
export TOOYEN_CONFIG=/cygdrive/d/proj/softwareab/tooyen/tooyen.config
CYGWIN="${CYGWIN} nodosfilewarning"; export CYGWIN

The TOOYEN_CONFIG is not necessary for you (I use it in my environment). The CYGWIN setting should work for you and retain any existing value.

In Windows 7, go here:

Control Panel > System > Advanced System Settings > Environment Variables

You will see 2 submenus: User variables and System variables. Under "User variables", click on New. Under "Variable name" enter "CYGWIN" (without the double quote marks). Under "Variable value" enter "nodosfilewarning" (without the double quotes).

Click on OK, OK, OK. The reason this solution will work where other solutions have failed is because some compilers and tools (such as the ediff tool in Gnu Emacs for Win32) will directly access the cygwin1.dll (which requires the variable and triggers the error message) and they bypass the initialization batch files which set the CYGWIN environment variable manually. When it is set in Control Panel, it is visible to all instances of your login identity, and thus it will take priority.

HAY GUISE!

I GoT An IDEA!!!

How B0ut iF We seT

cygwin=NODOSWARNING

MAYbe THaT WiLL worK???


Whattyathinkaboutthat?

Thanks man, it works perfectly!!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.