Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/21/06 19:53
Read: times


 
#118796 - extern-ing a function declaration?
Responding to: ???'s previous message
Alistair George said:
Hi its been ages since I was using my compiler.
Can make source OK. Paths and correct source file list are defined but when I go to compile there are errors relating to:
extern void lcdinit(void);

lcdinit();

error 'undefined symbol' _lcdinit


Dunno why the function declaration is externed. It should be declared in a header file that's included by the C source, and not externed.

Anyways: your code calls a function lcdinit(). The extern modifier says that "somewhere a function called lcdinit() has a definition." However, that definition isn't available.

You need a source file that has the implementation of lcdinit(), and a header file that declares lcdinit()'s interface so it can be included in and referenced by other sources.

-a

List of 18 messages in thread
TopicAuthorDate
Hi-tech C compile problem            01/01/70 00:00      
   Linker            01/01/70 00:00      
   Less Detail            01/01/70 00:00      
      'C' Globals            01/01/70 00:00      
   extern-ing a function declaration?            01/01/70 00:00      
      well...            01/01/70 00:00      
         The Secret            01/01/70 00:00      
            case was not an issue            01/01/70 00:00      
            Case still not an issue            01/01/70 00:00      
               Incorrect deduction            01/01/70 00:00      
                  Maybe Not            01/01/70 00:00      
                     Linker            01/01/70 00:00      
                        make            01/01/70 00:00      
   use Win98SE in a virtual machine, QEMU?            01/01/70 00:00      
      Vmware            01/01/70 00:00      
   Just a guess            01/01/70 00:00      
      possibly, but            01/01/70 00:00      
         after all the 'logicl' possibilities hav            01/01/70 00:00      

Back to Subject List