From: Brian Bagnall (bbagnall_at_mts.net)
Date: 2003-01-09 21:34:15
Forgive the newby question, but I'm having problems using include with a ridiculously basic object file I made. This example should call a method from a separate file. The main file is this: #include <stdio.h> #include "ia.h" int main(void) { int x; x = getnumber(); printf("The number is %i",x); } ia.h looks like this: extern int getnumber(void); ia.c looks like this: int getnumber(void) { return 45; } Here's the steps I went through to build an executable: 1. cc65 on ia.c to produce ia.s 2. ca65 on ia.s to produce ia.o 3. saved ia.h in same directory as the rest 4. compiles main.h with cl65. When I attempt step 4 it says: Unresolved external `_getnumber' referenced in: C:\Projects\Play\hist.s(11) Error: 1 unresolved external(s) found - cannot create output file All files are located in the same directory (source and object files). Any ideas? Brian Bagnall --------------------------------------------- My homepage http://www.mts.net/~bbagnall ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-01-09 21:35:25 CET