having problem with one area of guide , vc2005 express work?
-
- Member
- Posts: 65
- Joined: Wed Nov 14, 2007 3:19 pm
having problem with one area of guide , vc2005 express work?
Hi , have been following this guide for quite some time
http://www.brokenthorn.com/Resources/OSDevMSVC.html
The following page aims to setup vc2005 , so I figured I would try and follow it with vc express 2005 but if you look far down the page you will see in the configuration side menus there should be a section visual C++ , however with my vs express that doesnt appear to be there? Any ideas how I can get VSexpress to work with this guide? I dont want to mail the guy direct to much of the time which is why I posted here , If VC express doesnt work and thats a pro version hes using thats a fair bit of cash to put out
http://www.brokenthorn.com/Resources/OSDevMSVC.html
The following page aims to setup vc2005 , so I figured I would try and follow it with vc express 2005 but if you look far down the page you will see in the configuration side menus there should be a section visual C++ , however with my vs express that doesnt appear to be there? Any ideas how I can get VSexpress to work with this guide? I dont want to mail the guy direct to much of the time which is why I posted here , If VC express doesnt work and thats a pro version hes using thats a fair bit of cash to put out
-
- Member
- Posts: 65
- Joined: Wed Nov 14, 2007 3:19 pm
-
- Member
- Posts: 65
- Joined: Wed Nov 14, 2007 3:19 pm
lol well I must admit Ive learned a heap , all the software thus far has been great and cost 0 , after all Im just starting out much to learn before spending hundreds on some package and it may not be warranted. Im hoping that the author gets back to me in regards to if that part of the guide can only be completed with VS pro. I imagine there must be a way to do it in express but then my I think hmm were talking MS here so they may have taken that out of the express version? I dont know but I was really understanding those guides but yeah if a piece of MS software that costs much cash stops me going further with those really good guides I think I will start sharing in the MS hatred lol
I dont mind being stumped because something is to difficult for me , but to have to stop because the express version is missing config options is pretty annoying . Thing is I doubt I will find many guides as well explained as the broken thorn ones. I realise there still a few good guides out there Its just the brokenthorn ones were explained in a way I could see myself writing guides if I knew a specific subject well enough if you get what Im saying
Looks like Im going to have to see what else is out there for now, I will def be taking a look at the toolchain setup first though so I know from the start if Im going to be able to do it. (Not meaning to sound mean in the money sense here but I wouldnt pay out 300 bucks for VS pro when Im still learning and there still heaps I can learn with the gcc alternative, I mean I wouldnt go out and buy vs pro only to find OS dev isnt for me down the line and have wasted my cash)
I dont mind being stumped because something is to difficult for me , but to have to stop because the express version is missing config options is pretty annoying . Thing is I doubt I will find many guides as well explained as the broken thorn ones. I realise there still a few good guides out there Its just the brokenthorn ones were explained in a way I could see myself writing guides if I knew a specific subject well enough if you get what Im saying
Looks like Im going to have to see what else is out there for now, I will def be taking a look at the toolchain setup first though so I know from the start if Im going to be able to do it. (Not meaning to sound mean in the money sense here but I wouldnt pay out 300 bucks for VS pro when Im still learning and there still heaps I can learn with the gcc alternative, I mean I wouldnt go out and buy vs pro only to find OS dev isnt for me down the line and have wasted my cash)
All the config properties screenshots in the guide seem to be in VC 2005 Express for me. If you have the Solution Explorer turned on, you will see your project/solution name and any files contained in the project. Right-clicking on the project name and selecting properties will bring up the dialog from the screenshots. No need to use the pro version unless you want the resource editor
I will admit, that I too had trouble with that particular tutorial. The rest of the tutorials are great, but the pictures on that one and the instructions didn't line up with what I had and I have VS2005 pro. I am the reason he posted the demo on that page. What I ended up doing was copying his project file into my OS directory and then I used his project and my files. After that everything works great and you can look at what is in the project file to see how you could have done it yourself. I am much farther now and I would suggest that after you get as far as a VC++ kernel running that you check out the simple C++ kernel tutorial on osdever, that will help you get a good video driver going and I am still using the tutorials on osdever to develop my kernel because I have to wait for other parts of neon's tuts.
Getting back in the game.
Hey,
The tutorial was tested and uses visual C++ express edition, as that is more freely available.
I do not know how much of a difference the professional version has to the express versions (Besides a profiler, and resource editor). I am going to have to look into the problem.
The tutorial was tested and uses visual C++ express edition, as that is more freely available.
I do not know how much of a difference the professional version has to the express versions (Besides a profiler, and resource editor). I am going to have to look into the problem.
These are the instructions to followAll the config properties screenshots in the guide seem to be in VC 2005 Express for me. If you have the Solution Explorer turned on, you will see your project/solution name and any files contained in the project. Right-clicking on the project name and selecting properties will bring up the dialog from the screenshots. No need to use the pro version unless you want the resource editor
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
-
- Member
- Posts: 65
- Joined: Wed Nov 14, 2007 3:19 pm
Thank you once again all I will take another look. I do have my project name in the solution explorer called kernel, next I righyt click , goto properties and down the left side it had menus like link etc but not the menu visual C++ , maybe Ive missed something though , im going to try again, I also got a loan of visual studio from a friend whos college has it
Ok in express , goto file--->new project
On the left it has project types
Visual C++
CLR
WIN32
General
I single click general which shows the following on the right
empty project
makefile project
search online templates
I single click empty project
I type Kernel into the name field and hit enter
I the see in solution window on left:
Solution Kernel (1project)
Kernel
Header files
Rescourse files
Source files
I then right click Kernel and click properties
Ok now heres my window setup
Configuration: Active Debug Platform:Active Win32
Now on the Left of that windows menus:
Common Properties-
Framework & references
Configuration Properties-
General
Debugging
Linker
Manifest tool
Xml doc generator
Browse information
Build events
Custom build step
To myself at this point it looks like Im missing the menu Visual C as in the guide?
Im more confident Im going wrong somewhere now though , maybe someone can explain why that not there, my solution explorer is open
Ok in express , goto file--->new project
On the left it has project types
Visual C++
CLR
WIN32
General
I single click general which shows the following on the right
empty project
makefile project
search online templates
I single click empty project
I type Kernel into the name field and hit enter
I the see in solution window on left:
Solution Kernel (1project)
Kernel
Header files
Rescourse files
Source files
I then right click Kernel and click properties
Ok now heres my window setup
Configuration: Active Debug Platform:Active Win32
Now on the Left of that windows menus:
Common Properties-
Framework & references
Configuration Properties-
General
Debugging
Linker
Manifest tool
Xml doc generator
Browse information
Build events
Custom build step
To myself at this point it looks like Im missing the menu Visual C as in the guide?
Im more confident Im going wrong somewhere now though , maybe someone can explain why that not there, my solution explorer is open
Try creating a source file (*.cpp), and tell us what happensTo myself at this point it looks like Im missing the menu Visual C as in the guide?
The C/C++ tab should display then.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
-
- Member
- Posts: 65
- Joined: Wed Nov 14, 2007 3:19 pm
Actually, try just creating a source file first. I believe vc++ express only displays the c/c++ tab when required.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
-
- Member
- Posts: 65
- Joined: Wed Nov 14, 2007 3:19 pm
lol neon I think thats it , yes Ok what I did I right clicked the source folder in solution explorer , then clicked add file, next double clicked .cpp
and entered the following code:
I then compiled and ran it, compiling was fine but running had an error prob because Ive done the wrong format start for a w32 app but the thing is it now shows the visual C++ tab
I never thought to even try anything like that , apologies but it works now
and entered the following code:
Code: Select all
#include<stdio.h>
int main ()
{
return 0;
}
I never thought to even try anything like that , apologies but it works now
-
- Member
- Posts: 65
- Joined: Wed Nov 14, 2007 3:19 pm
Just to finally add :
cheers for pointing me in the direction of a good next step lord mage , I must admit Im actually starting to see how people could get lots out of os dev ! Getting good info like the brokenthorn guide for myself has been a must, Im going to check out the guide you suggested, hopefully those guides together give me as good a start as possible. (Time to get reading again )
Edit:
The file demo 4.zip on the broken thorn tutorial works perfectly Im going to just start making sure to get to grips with inline assembly, assembly and C and start adding my own content with whats in that zip as a base(God help us all lol) . Anyway this is probably nothing to worry about but Its either stage 2 or 3 on the page that you can download demo4 well the nasm batch file executed command gives a dwords bounds warning. So Im thinking say I wanted to do something simple like print my name with a really un-standard print c function, which uses memcpy,memset , maybe I will lump all these functions plus 1 execution - print hello test all in a file called myprint_test.c next I create a linker script , compile the src file myprint_test.c , link the myprint_test.o file to stage3.asm from neons tutorial
Im hoping the good practice of the way the stack & such is setup from neons tutorial and his stage 3 will be able to have part of brans c files integrated. I followed all the tutorial great but its the visual c part, even though I managed to get the menus filled in correctly I didnt follow some of the VC unique naming conventions MCX:A or something strange like that so I figured I would be better getting gcc with ld working at this point.
I think VC must only be good if youve worked in the OS dev industry or know the software inside out , but I dont want to be fighting with 100s of ide settings, I would rather be learning by my coding as much as poss. (Plus as mentioned those naming conventions at the end of the VC tutorial are whack lol , they dont seem to stand for anything that makes sense)
I better be clear about what Im reffering to actually Ok this page:
http://www.brokenthorn.com/Resources/OSDevMSVC.html
Go down to MS Naming conventions
Yeah neon I would like to know that also from that statement on I was lost and Im not talking about the cdecl calling convention but microsofts naming
I reckon VC must be good but I just want to be able to compile and link as lightweight as possible minimum garbage and add stuff slowly, maybe adding more C standards as I know what Im doing, just seems with VC it adds a big overhead at the start, which I feel Im going to have most of my time just taken up comprehending the coding so I am going to try making my own c functions with gcc.
(Still awsome guide , but bringing VC in with all the considerations it beings to the table would probably require a huge guide in itself, I dont envy you having to write guides like that hehe)
cheers for pointing me in the direction of a good next step lord mage , I must admit Im actually starting to see how people could get lots out of os dev ! Getting good info like the brokenthorn guide for myself has been a must, Im going to check out the guide you suggested, hopefully those guides together give me as good a start as possible. (Time to get reading again )
Edit:
The file demo 4.zip on the broken thorn tutorial works perfectly Im going to just start making sure to get to grips with inline assembly, assembly and C and start adding my own content with whats in that zip as a base(God help us all lol) . Anyway this is probably nothing to worry about but Its either stage 2 or 3 on the page that you can download demo4 well the nasm batch file executed command gives a dwords bounds warning. So Im thinking say I wanted to do something simple like print my name with a really un-standard print c function, which uses memcpy,memset , maybe I will lump all these functions plus 1 execution - print hello test all in a file called myprint_test.c next I create a linker script , compile the src file myprint_test.c , link the myprint_test.o file to stage3.asm from neons tutorial
Im hoping the good practice of the way the stack & such is setup from neons tutorial and his stage 3 will be able to have part of brans c files integrated. I followed all the tutorial great but its the visual c part, even though I managed to get the menus filled in correctly I didnt follow some of the VC unique naming conventions MCX:A or something strange like that so I figured I would be better getting gcc with ld working at this point.
I think VC must only be good if youve worked in the OS dev industry or know the software inside out , but I dont want to be fighting with 100s of ide settings, I would rather be learning by my coding as much as poss. (Plus as mentioned those naming conventions at the end of the VC tutorial are whack lol , they dont seem to stand for anything that makes sense)
I better be clear about what Im reffering to actually Ok this page:
http://www.brokenthorn.com/Resources/OSDevMSVC.html
Go down to MS Naming conventions
The section names used in MSVC++ are very strange. Serously--.CRT$XCU? What were they thinking!?
Yeah neon I would like to know that also from that statement on I was lost and Im not talking about the cdecl calling convention but microsofts naming
I reckon VC must be good but I just want to be able to compile and link as lightweight as possible minimum garbage and add stuff slowly, maybe adding more C standards as I know what Im doing, just seems with VC it adds a big overhead at the start, which I feel Im going to have most of my time just taken up comprehending the coding so I am going to try making my own c functions with gcc.
(Still awsome guide , but bringing VC in with all the considerations it beings to the table would probably require a huge guide in itself, I dont envy you having to write guides like that hehe)
I just want to say that I saw those wierd naming conventions and had brain haze, but I ignored them figuring I would learn them if and when I needed to. I haven't had to yet and I just finished designing and formating my console interface. You won't have to mess with the funky names. The only time I see them is when I have an unrecognized external and that is usually my mistake and has nothing to do with the stuff VC adds. in your ASM files you just put a _ infront of the name so
thats it. no hassle really.
infact if you want difficult, try to understand the inline asm format from gcc, it is nothing like normal asm. The inline for VC++ though is almost exactly like NASM.
EDIT: one last thing, in VC++ you don't have to mess with that linker crap either. I'd say the only difficult bit is getting it setup in the first place after that its cake.
Code: Select all
_LoadGDT instead of LoadGDT()
[\code]
and then in VC your declaration would be
[code]
extern "C" void _cdecl LoadGDT();
infact if you want difficult, try to understand the inline asm format from gcc, it is nothing like normal asm. The inline for VC++ though is almost exactly like NASM.
EDIT: one last thing, in VC++ you don't have to mess with that linker crap either. I'd say the only difficult bit is getting it setup in the first place after that its cake.
Getting back in the game.