View Full Version : StormC compiler, linker loops
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 <exec/types.h>
#include <exec/libraries.h>
#include <pragma/dos_lib.h>
#include <pragma/exec_lib.h>
#include <stdio.h>
#include <string.h>
What is wrong?
Thanks
Kronos
01-22-2003, 01:53 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.
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 <stdio.h>
#include <pragma/exec_lib.h>
and that one loops during link-phase!
I''ll try it with your suggestion.
Thanks, and I''ll let you know!
iamaboringperson
01-22-2003, 02:04 PM
i dont know,
but i use clib/xxxx_protos.h also
Hi, you boring one
I''ve changed the include-lines to the suggested ones.
They now read
#include <stdio.h>
//#include <pragma/exec_lib.h> (commented out in C++-style)
#include <clib/exec_protos.h>
and the loop goes on, and the loop goes on!
thanks anyway!
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
tonyw
01-23-2003, 10:50 PM
You mean you didn't check the return value from the OpenLibrary() call? Silly boy.
tony
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<P
Cheers
tonyw
01-24-2003, 04:14 PM
:-D
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.