On 13/08/02 01:44 -0400, Stef Telford wrote: > Piers Harding wrote: > > > > I think your problem is a couple of things: > > (1) dont't use main() as a function name > > (2) allocate the space for the structure timep > > > > Ahhh, understand. point 2 was mainly due to the > horribly 'rusty' nature of my C programming skills. > However, why is main() not allowed ? or rather, why > does it conflict with Inline ? > > The concept of 'reserved' words or procedures is > something that doesnt trouble me, however, main() > is pretty much a 'de facto' in every single C program > that has ever been typed. is this one of those caveat > emptor's that is explained someplace ? (it would be a > worthwhile read incase there are any others :)
With Inline you are writing C functions that are being linked to the Perl interpreter. The Perl interpreter is a C program itself and you can bet the farm that it has a main() function of its own. The problem is not limited to main() either. There are a whole slew of functions that are global in the Perl interpreter, and will give you fits when you use them with Inline. I ship Inline with a list of them. That's my only workaround for now. Cheers, Brian
