I used to compile my C codes using gcc.exe ,I get an error as "envoirmental variable DJGPP undefined".I am a new OSdevelopment , what is the solution for that.
Please I had been reading a Brans Kernel Development Tutorial just to learn and I wished to compile the kernel and this error spoilt my happiness of compiling and boot.
wiki.osdev.org is awsom.
A common GCC error!
Re: A common GCC error!
Hi,
The DJGPP download page has the required info for setting the DJGPP environment variable for a short-term fix (or it did when I last used DJGPP 5 years ago!).
The better long term solution, though, is to use a GCC Cross-Compiler. If you follow that tutorial and get any errors, it has become a sort of "standard" on OSDev.org and you'll find there are many more people who can help you to find solutions.
Cheers and welcome,
Adam
[edit: Yup - just had a quick look at the DJGPP zip picker and the installation info is still a part of the download. Be warned though - you will get less helpful support from the OSDev community if you continue with DJGPP...]
The DJGPP download page has the required info for setting the DJGPP environment variable for a short-term fix (or it did when I last used DJGPP 5 years ago!).
The better long term solution, though, is to use a GCC Cross-Compiler. If you follow that tutorial and get any errors, it has become a sort of "standard" on OSDev.org and you'll find there are many more people who can help you to find solutions.
Cheers and welcome,
Adam
[edit: Yup - just had a quick look at the DJGPP zip picker and the installation info is still a part of the download. Be warned though - you will get less helpful support from the OSDev community if you continue with DJGPP...]
Re: A common GCC error!
For anyone following this thread, OP also posted in http://forum.osdev.org/viewtopic.php?f=1&t=1753 which is now locked.
Solution!!!
SET DJGPP=c:/wherever you put djgpp/djgpp.env
Put the above line in your autoexec.bat. If you still get the error message, check if you have installed all neccessary DJGPP packages.
This was the solution written by uri.
autoexec.bat (Under Windows) is located on the drive where you have installed WINDOWS.Also note that it is a hidden operating system file and must be careful while editing it.You can open it by typing the following in the run."C:\autoexec.bat"
Replace 'C:\' with your drive containing WINDOWS.
More information visit: http://en.wikipedia.org/wiki/AUTOEXEC.BAT
To fix the error follow these steps:
Open autoexec.bat in notepad and copy the code below to it.
SET DJGPP=c:/wherever you put djgpp/djgpp.env
NOTE:Dont forget to to set the location where you have installed djgpp.(Look at the code up once)
If you get Ascess is denied ,do the following:
1)Save the autoexec.bat somewhere else.(Keep the extension as bat)
2)Copy and paste it on the drive were WINDOWS is installed.
3)It has to copy.
I have tested it!
Good Luck!
Put the above line in your autoexec.bat. If you still get the error message, check if you have installed all neccessary DJGPP packages.
This was the solution written by uri.
autoexec.bat (Under Windows) is located on the drive where you have installed WINDOWS.Also note that it is a hidden operating system file and must be careful while editing it.You can open it by typing the following in the run."C:\autoexec.bat"
Replace 'C:\' with your drive containing WINDOWS.
More information visit: http://en.wikipedia.org/wiki/AUTOEXEC.BAT
To fix the error follow these steps:
Open autoexec.bat in notepad and copy the code below to it.
SET DJGPP=c:/wherever you put djgpp/djgpp.env
NOTE:Dont forget to to set the location where you have installed djgpp.(Look at the code up once)
If you get Ascess is denied ,do the following:
1)Save the autoexec.bat somewhere else.(Keep the extension as bat)
2)Copy and paste it on the drive were WINDOWS is installed.
3)It has to copy.
I have tested it!
Good Luck!
Re: A common GCC error!
..What? This is neither an Os design, or theory. Any announcement should be put in the forum stated.
Also, please start them out a little better, do not just jump halfway into the subject. The title barely tells us what it is your presenting as it is.
Also, please start them out a little better, do not just jump halfway into the subject. The title barely tells us what it is your presenting as it is.
Re: A common GCC error!
...and what version of Windows are you using if you still have autoexec.bat? That's not the way to set up environment variables in anything beyond about the Win9x series.
To avoid future issues, please use the cross-compiler.
Cheers,
Adam
To avoid future issues, please use the cross-compiler.
Cheers,
Adam