byteworksinc / ORCA-C

Other
80 stars 7 forks source link

ORCA/C 2.2.0 B6 link issues #80

Closed xandark closed 1 year ago

xandark commented 1 year ago

I can compile my very large Animasia 3-D project with 2.2.0 B6 but linking is another story. I have the latest headers, compiler, linker, and ORCALib from the ORCAC.220B6.2mg release disk.

I've made a test program to show what I'm seeing...

#include <ctype.h> 
#include <string.h>
#include <stdio.h>

void main( void )
{
const char* a2 = "Apple II";
char        buffer[ 50 ];
int     total;

total = strlen( a2 );
sprintf( buffer, "Size of Apple II is: %d\n", total );
printf( buffer );
}

iix chtyp -l cc test-stdlib.c iix compile test-stdlib.c

ORCA/C 2.2.0 B6

Including :home:michael:orca:Libraries:ORCACDefs:ctype.h
Including :home:michael:orca:Libraries:ORCACDefs:string.h
Including :home:michael:orca:Libraries:ORCACDefs:stdio.h
Compiling main

0 errors found.

iix link --keep=test-stdlib test-stdlib

Link Editor 2.0.6

Pass 1: .............
Pass 2: .
Error at 0000000A past ~_ROOT PC = 0000000A : Unresolved reference Label: ~C_STARTUP

Error at 00000012 past ~_ROOT PC = 00000012 : Unresolved reference Label: ~C_SHUTDOWN
.
Error at 0000001C past main PC = 00000031 : Unresolved reference Label: strlen

Error at 0000003C past main PC = 00000051 : Unresolved reference Label: sprintf

Error at 0000004F past main PC = 00000064 : Unresolved reference Label: printf
...........

5 errors found during link
8 was the highest error level

There is 1 segment, for a length of $00000449 bytes.

Any idea of where to look to resolve these linker errors?

sheumann commented 1 year ago

It seems like the linker cannot find ORCALib. Can you check to make sure it's present in the Libraries directory and has the LIB ($B2) file type?

xandark commented 1 year ago

That was totally it, facepalm. Thanks!

xandark commented 1 year ago

Needed the proper file type, keep forgetting about that