Making OS in VS 2005 (pro)
Making OS in VS 2005 (pro)
i have both Visual Studio 2005 Professional Edition with C++ and Cygwin. i heard you can make a OS in Visual Studio... Is it Possible?
Exactly. There is an article in the wiki about configuring VC++ for compiling, so you might want to give it a try. (not for the weak of heart)
--Michael
--Michael
what benefits (apart from a great IDE) do you get when using VS2005? No debugger (unless you write a windbg stub for your kernel), no EH (and if you try to support it, you sacrifise FS register), less control over compiler (as comparef to gcc).
The trick in the wiki really cheats (so does msvceok) and isnt a very elegant of solution.
The solution (as suggested by many) - use VS as an IDE, compile using gcc.
I once tried writing test kernel in VS2005 C++, it was a basic kernel-success! But trust me - gcc makes life much more easier.
The trick in the wiki really cheats (so does msvceok) and isnt a very elegant of solution.
The solution (as suggested by many) - use VS as an IDE, compile using gcc.
I once tried writing test kernel in VS2005 C++, it was a basic kernel-success! But trust me - gcc makes life much more easier.
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Yeah. I really can't suggest it either. Go with Cygwin. (Or Mingw. Did they ever fix that bug? I haven't used it in ages...)
As for the debugger, I believe several emulators come with one built in. (GDB, I think.)
That's about it. You could even try a different editor if you like. (Vi is nice.)
That's about it.![Wink ;)](./images/smilies/icon_wink.gif)
As for the debugger, I believe several emulators come with one built in. (GDB, I think.)
That's about it. You could even try a different editor if you like. (Vi is nice.)
That's about it.
![Wink ;)](./images/smilies/icon_wink.gif)
C8H10N4O2 | #446691 | Trust the nodes.
- Kevin McGuire
- Member
- Posts: 843
- Joined: Tue Nov 09, 2004 12:00 am
- Location: United States
- Contact:
No, msvceok does not cheat. At the very least I had been arguing that it was a very elegant way. It uses a stub inserted by the linker which loads the PE32 correctly into memory.The trick in the wiki really cheats (so does msvceok) and isnt a very elegant of solution.
I wrote that. I remember, before any other had. By the way does anyone have the most recent version of that I wrote? I lost it a while back. Found it for a guy and uploaded to the old forum.. then during the transition here it got lost again (the post attachment)... sadly..
The trick in the wiki really cheats..
You are right about this. I kept telling people it would not work forever. They just would not listen. I am glad someone else finally views that ""trick in the wiki"" the same as I did.
-
- Posts: 24
- Joined: Wed Jun 27, 2007 10:34 am
I'm using a combination of the microsoft c compiler with the GNU linker and NASM.
I did this by creating a makefile project in VS2005 and creating a batchfile wich calls cl.exe (the MS C compiler). I used the GNU linker because it offers some flexibility that the microsoft linker doesn't have (or that I'm not aware of).. in my case linker scripts![Smile :)](./images/smilies/icon_smile.gif)
I suggest you learn some information about Multiboot compatible PE kernels to start out with. I don't reccommend doing a non multiboot compatible PE kernel, because you would need a custom bootloader which is able to load PE images.
It's not possible to use VS2005 debugging, because:
- You would be running in a virtual enviroment (either Bochs, Virtual PC, VmWare etc)
- VS2005 uses a background service (called MDM) for debugging windows applications. Which you clearly don't have in your OS.
So if you want good debugging tools, I suggest you use BOCHS (helped me out a lot of times).
I did this by creating a makefile project in VS2005 and creating a batchfile wich calls cl.exe (the MS C compiler). I used the GNU linker because it offers some flexibility that the microsoft linker doesn't have (or that I'm not aware of).. in my case linker scripts
![Smile :)](./images/smilies/icon_smile.gif)
I suggest you learn some information about Multiboot compatible PE kernels to start out with. I don't reccommend doing a non multiboot compatible PE kernel, because you would need a custom bootloader which is able to load PE images.
It's not possible to use VS2005 debugging, because:
- You would be running in a virtual enviroment (either Bochs, Virtual PC, VmWare etc)
- VS2005 uses a background service (called MDM) for debugging windows applications. Which you clearly don't have in your OS.
So if you want good debugging tools, I suggest you use BOCHS (helped me out a lot of times).