Thread overview | |||||
---|---|---|---|---|---|
|
August 17, 2011 Problem using libs... | ||||
---|---|---|---|---|
| ||||
Hi there, I'm hoping some can help me here. I'm trying to use DMC to compile a raw 16-bit binary (.com) for use in a bootloader. To cut a very long story short, everything is coolio until I try and use a function from the standard libraries. At which point I am greeted with the message: \lib\SDS.lib(c) Error 42: Symbol Undefined _main Of course, if I define it then the exe2bin conversion fails. Is it not possible to use the standard libraries from .com objects? Or if it is, can anyone give me a clue of how to go forward from this. Many thanks. 8 |
August 17, 2011 Re: Problem using libs... | ||||
---|---|---|---|---|
| ||||
Posted in reply to Eight | Ack, forgot to add. "#include <time.h>" or "#include <ctime>" works fine. "time_t seconds;" appears to work fine. But "seconds = time(NULL);" causes the error to appear. I've tried this with a few different standard funcs, and the same behaviour occurs. When a function is called, _main seems to become an issue. Cheers. |
August 20, 2011 Re: Problem using libs... | ||||
---|---|---|---|---|
| ||||
Posted in reply to Eight | Eight wrote:
> I'm trying to use DMC to compile a raw 16-bit binary (.com) for use in a
> bootloader. To cut a very long story short, everything is coolio until I try
> and use a function from the standard libraries. At which point I am greeted
> with the message:
> \lib\SDS.lib(c)
> Error 42: Symbol Undefined _main
>
> Of course, if I define it then the exe2bin conversion fails.
>
> Is it not possible to use the standard libraries from .com objects? Or if it
> is, can anyone give me a clue of how to go forward from this.
first off, you do need a main() function. Second, conversion to .com fails if your code+data exceed 64K in size. So, I'd try starting with a trivial program first.
|
Copyright © 1999-2021 by the D Language Foundation