Amiga.org

Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: on January 22, 2003, 08:40:04 PM

Title: StormC compiler, linker loops
Post by: on January 22, 2003, 08:40:04 PM
Hi,

Yes, I''ve got a StormC-compiler. From de ADCD_2.1 develloper CD. So version 3.

The problem is: the linker loops, when:

#include
#include
#include
#include

#include
#include

What is wrong?

Thanks
Title: Re: StormC compiler, linker loops
Post by: Kronos on January 22, 2003, 08:53:01 PM
Could be the pragma which isn't standardized.

AFAIR pragma is SAS-C whiles pragmas would be StormC
(or is it vice-versa ?).

Better use the clib/xxxxxx_protos.h which should work with all compilers.
Title: Re: StormC compiler, linker loops
Post by: on January 22, 2003, 09:02:57 PM
Hi Kronos,

thanks for your early reply

I''ve set up a very small program lately to sort things out. It can be regarded as the sequel to Unix/K&R's famous "Hello world". Well, something like

void main(void)
{
    printf("Bye, bye, Windoze!\n");
}

with only  a handfull of #include-lines:

#include
#include

and that one loops during link-phase!

I''ll try it with your suggestion.

Thanks, and I''ll let you know!
Title: Re: StormC compiler, linker loops
Post by: iamaboringperson on January 22, 2003, 09:04:58 PM
i dont know,
but i use clib/xxxx_protos.h also
Title: Re: StormC compiler, linker loops
Post by: on January 22, 2003, 09:11:15 PM
Hi, you boring one

I''ve changed the include-lines to the suggested ones.

They now read

#include
//#include (commented out in C++-style)
#include

and the loop goes on, and the loop goes on!

thanks anyway!
Title: Re: StormC compiler, linker loops
Post by: on January 23, 2003, 06:45:31 PM
Hi Kronos,

Remember the looping linker of StormC?

ah, silly me! sorry for stealing your time. i found the culprit:

struct Library *DOSBase;

this should be:

struct Library *DosBase;

Never forget this again!

Cheers
Title: Re: StormC compiler, linker loops
Post by: tonyw on January 24, 2003, 05:50:08 AM
You mean you didn't check the return value from the OpenLibrary() call? Silly boy.

tony
Title: Re: StormC compiler, linker loops
Post by: on January 24, 2003, 06:33:38 PM
Hi tony,

No, what I meant was: I misspelled the word DosLibrary as DOSLibrary. If you delve into some headerfile you may encounter the word DOSBase. That is what confused the linker.

No. I''m not that stupid. Not to check return-values. phah! Who! Me? No you must be kidding. After nearly thirty years of keeping bits upright, it is a second nature. =8
Cheers
Title: Re: StormC compiler, linker loops
Post by: tonyw on January 24, 2003, 11:14:56 PM
 :-D