![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Aug 2005
Location: Norway
Posts: 56
Rep Power: 0
![]() |
Make my own library.
Hi!
I'm planning to write a little Operative System. I'm also going to write programs to the OS, so cout, cin and all of this stuff doesn't work on the OS. So I'm need to make my own function that handle that, and transelate directly to ASM. So I wondered how I can make mye own library without to have the .h file in the directory where the .cpp file. Anybody that can answer that?
__________________
Heh. |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
you mean you don't want to put the .h files in the folder where also your cpp files are, so you don't have to define like this:
#include "iostream.h" You can pass gcc the parameter -i/path/to/different/header/directory, gcc will look in that directory then to find header files. |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Aug 2005
Location: Norway
Posts: 56
Rep Power: 0
![]() |
Sorry my english...
Something like this: #include <mylibrary> Is that possible? I'm using Windows platform to make the OS.
__________________
Heh. |
|
|
|
|
|
#4 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
That's what I said in the last line of my previous post
so it is possible. This works only on gcc - but that's what I recommend for compiling your OS. If you use MS Visual C++, you can add a header file path at options. |
|
|
|
|
|
#5 |
|
Programmer
Join Date: Aug 2005
Location: Norway
Posts: 56
Rep Power: 0
![]() |
Ok!
Thanks! Maybe you'll se the OS when it's finished. EDIT: Can I use variable names that is declared in C++ to move around with Inline-Assembler? Example: mov ax, number
__________________
Heh. |
|
|
|
|
|
#6 |
|
Programmer
Join Date: May 2005
Posts: 41
Rep Power: 0
![]() |
|
|
|
|
|
|
#7 | |
|
Programming Guru
![]() |
Quote:
__________________
|
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|