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.
I just attempted to compile my OS with my Cygwin cross-compiler that I have built. It's targeted to elf and all that, but these are the sort of errors I get:
$ make -f Makefile_cygwin all
Compiling kernel.cc
kernel.cc: In function 'void __cxa_pure_virtual()':
kernel.cc:50: warning: deprecated conversion from string constant to 'char*'
kernel.cc: In function 'void nullproc()':
kernel.cc:71: warning: deprecated conversion from string constant to 'char*'
kernel.cc:74: warning: deprecated conversion from string constant to 'char*'
kernel.cc:76: warning: deprecated conversion from string constant to 'char*'
kernel.cc: In function 'int main(multiboot_info_t*, unsigned int)':
kernel.cc:95: warning: deprecated conversion from string constant to 'char*'
kernel.cc:97: warning: deprecated conversion from string constant to 'char*'
kernel.cc:100: warning: deprecated conversion from string constant to 'char*'
kernel.cc:102: warning: deprecated conversion from string constant to 'char*'
kernel.cc:110: warning: deprecated conversion from string constant to 'char*'
kernel.cc:115: warning: deprecated conversion from string constant to 'char*'
kernel.cc:118: warning: deprecated conversion from string constant to 'char*'
kernel.cc:120: warning: deprecated conversion from string constant to 'char*'
kernel.cc:123: warning: deprecated conversion from string constant to 'char*'
kernel.cc:125: warning: deprecated conversion from string constant to 'char*'
kernel.cc:128: warning: deprecated conversion from string constant to 'char*'
kernel.cc:130: warning: deprecated conversion from string constant to 'char*'
kernel.cc:136: warning: deprecated conversion from string constant to 'char*'
kernel.cc:138: warning: deprecated conversion from string constant to 'char*'
kernel.cc:141: warning: deprecated conversion from string constant to 'char*'
kernel.cc:143: warning: deprecated conversion from string constant to 'char*'
kernel.cc:146: warning: deprecated conversion from string constant to 'char*'
kernel.cc:147: warning: deprecated conversion from string constant to 'char*'
kernel.cc:148: warning: deprecated conversion from string constant to 'char*'
It looks as if you have transgressed against the decrees of some high priest of software development fashion. I wouldn't worry about it. If you are using a C++ compiler, they are forever giving you grief of that sort. Tell it to compile as a C program (if you can) and all of the warning and error messages will suddenly evaporate like the morning mist.
Last edited by mathematician on Mon May 28, 2007 3:29 am, edited 2 times in total.
pcmattman wrote:No, they'll get worse, because I use classes
I was hoping this would stop my template problem (ie. won't link), but it hasn't, just made it more obscure
You could try to handle string constants as const char *'s instead, since you can't modify them. What version of GCC warns for it though? Is that a 4.1.2?
The fix for this is simple. Place the const modifier in functions that use strings (like display) and the warnings will go away. I am switching from C to C++ kernel and that's what I did.
Hmm I didnt notice the thread was old. oops
I have an 80386SX 20MHz 2MB RAM.
It is my testbed platform. Only has the 3.5" and 5.25" floppy drives.