Can someone make a guide to setting up a windows environment

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
shadow00
Posts: 7
Joined: Wed Apr 02, 2008 5:40 pm

Can someone make a guide to setting up a windows environment

Post by shadow00 »

I've tried things like Bran's kernel tutorial, but I always get stuck on something like the linker, (right now it says unrecognized format.)

Can someone create a wiki article on setting up a windows environment for at least the Bran tutorial?
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Install cygwin. Follow "How to build a cross compiler" wiki article. Compile. Success.
User avatar
karloathian
Posts: 22
Joined: Fri Mar 28, 2008 12:09 am

Post by karloathian »

JamesM wrote: 1- Install cygwin.
2- Follow "How to build a cross compiler" wiki article.
3- Compile.
4- ??????
5- Success.
I fixed it for you. Now it looks even more cool to compile GCC and secretive too.
shadow00
Posts: 7
Joined: Wed Apr 02, 2008 5:40 pm

Post by shadow00 »

JamesM wrote:Install cygwin. Follow "How to build a cross compiler" wiki article. Compile. Success.
That leaves out a lot of critical things like that a default cygwin install doesn't include gcc or make. There's also the issue that the installer downloads from mirrors, half of which seem to be down, and others seem to completely stop in the middle of downloading a file. I might eventually get back to you on whether that works at all after everything is compiled.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

I just download from ftp.gnu.org, works for me every time. And yes, you have to install gcc& make :roll: omgz the initiative.
shadow00
Posts: 7
Joined: Wed Apr 02, 2008 5:40 pm

Post by shadow00 »

JamesM wrote: And yes, you have to install gcc& make :roll: omgz the initiative.
From a teaching perspective, assuming things like that is completely unacceptable you know.

And following the gcc cross compiler instructions in cygwin, the "make all" portion fails in binutils/ld/emultempl/elf32.em with multiple "warning: 'return' with no value, in function returning non-void"

Now to try gcc.

(please test out your advice first!)
User avatar
codemastersnake
Member
Member
Posts: 148
Joined: Sun Nov 07, 2004 12:00 am
Contact:

Post by codemastersnake »

I use DJGPP. It works fine for me.
shadow00
Posts: 7
Joined: Wed Apr 02, 2008 5:40 pm

Post by shadow00 »

gcc also fails during the configure script with messages about a file may be in a separate package. At this point I gave up on the so called 'solution' and didn't bother to write down the technical aspects.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

shadow00 wrote:
JamesM wrote: And yes, you have to install gcc& make :roll: omgz the initiative.
From a teaching perspective, assuming things like that is completely unacceptable you know.
I absolutely agree with you 100%, with one minor addendum - do I look like a teacher? as far as I'm aware I was just here in my spare time to guide you, not teach you. Initiative and google are assumed.
And following the gcc cross compiler instructions in cygwin, the "make all" portion fails in binutils/ld/emultempl/elf32.em with multiple "warning: 'return' with no value, in function returning non-void"

No to try gcc.
How can you try gcc when binutils failed to build?
(please test out your advice first!)
Done and done. I've compiled many cross toolchains on cygwin. And linux.
gcc also fails during the configure script with messages about a file may be in a separate package. At this point I gave up on the so called 'solution' and didn't bother to write down the technical aspects.
Did you install texinfo? usually all you need to diagnose the problem is output on stdout... ;)

And you "giving up" at this stage tells me all I need to know about your character.

Good bye,

James
shadow00
Posts: 7
Joined: Wed Apr 02, 2008 5:40 pm

Post by shadow00 »

I've compiled many cross toolchains on cygwin. And linux.
You would still have to say that you've tried on the current versions of the software. Additional installed packages you used would also help.

And you "giving up" at this stage tells me all I need to know about your character.
I'm just giving up on your advice and moving on to someone else's, If you're not really willing to commit to helping you probably shouldn't have said anything in the first place really.
inph
Posts: 7
Joined: Thu Feb 21, 2008 8:15 am
Location: Leeds, UK

Post by inph »

I don't think you're going to find much help around here with that sort of attitude.
shadow00
Posts: 7
Joined: Wed Apr 02, 2008 5:40 pm

Post by shadow00 »

inph wrote:I don't think you're going to find much help around here with that sort of attitude.
It's already apparent to me that people around here wont be that helpful, and technically I'm just saying the wiki should include windows environment instructions. I'll figure it out eventually on my own, and put the article up myself when I have.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

The wiki contains detailed instructions for windows that when followed to the letter will result in a working compiler, assembler and linker. That tutorial has been tried and tested an astronomical number of times.

Read once again GCC Cross-Compiler and [wiki]Bran's Known Bugs[/wiki]

Essentially, PEBKAC. Proven.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: Can someone make a guide to setting up a windows environ

Post by neon »

shadow00 wrote:I've tried things like Bran's kernel tutorial, but I always get stuck on something like the linker, (right now it says unrecognized format.)

Can someone create a wiki article on setting up a windows environment for at least the Bran tutorial?
How much experience do you have with programming in C or C++? How well do you understand them, and how they are compiled and linked into workable assembly language?

...Once you learn these, you will also learn that there are alot of ways to get things running the way you want (or required); and you will better understand everything as well (Including the Wiki links posted above.)
I've tried things like Bran's kernel tutorial, but I always get stuck on something like the linker, (right now it says unrecognized format.)
...Here the linker is telling you that it does not understand the object code generated by the compiler. If the compiler and linker do not speak the same language, there is a problem. Have GCC and LD output and input the same object file format.

For example, in a previous OS of mine we were using elf executables. We used GCC to output i386 elf formats, and used LD-elf.exe to link them.

The Cross Compiler is meant to provide a workable envirement to help insure that the tools are compatible with each other.

In any case, if you receive any errors: Post the full error message! This is very important.

Good luck with your os developing :)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

shadow00 wrote:
I've compiled many cross toolchains on cygwin. And linux.
You would still have to say that you've tried on the current versions of the software. Additional installed packages you used would also help.
I have. I have a script which creates a cross compiler - I ran it on my girlfriend's winXP box two weeks ago, compiling gcc 4.2. Works fine for me. As combuster said - PEBKAC.
And you "giving up" at this stage tells me all I need to know about your character.
I'm just giving up on your advice and moving on to someone else's, If you're not really willing to commit to helping you probably shouldn't have said anything in the first place really.
I don't have to commit to anything - I use my free time to help people out on these forums, I do not expect to be at their beck and call, telling me what I have and have not to do. I will help when I can, and in this instance I can help, should you choose to ask, but posting meaningless "it doesn't work but I can't be arsed to post the error message" garbage is not going to get you anything in return.

The old mantra, Garbage in, garbage out, applies quite well to this case.

And, if you expect me to 'commit', why be so hypocritical and do the opposite yourself?

Cheers,

James
Post Reply