Skip to Content.
Sympa Menu

charm - [charm] Extern in conv-ldb

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] Extern in conv-ldb


Chronological Thread 
  • From: Hrushit Parikh <parikhhrushit AT hotmail.com>
  • To: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: [charm] Extern in conv-ldb
  • Date: Sun, 24 Aug 2014 08:58:47 +0530
  • Importance: Normal
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Hi,
I have a function " int findLoad(int m, char *msg ) " in charm/src/conv-ldb/cldb.neighbour.c
I wish to call this function in charm/src/conv-core/convcore.c

I declared extern void findLoad(int, char *) in convcore.c and tried calling the function. The charm library builds fine but when I make any charm++ example I get an error:
convcore.c:(.text+0x1911): undefined reference to `findLoad()'

How do I call this function in convcore.c?

I am surprised this does not work because an exactly similar approach is used in convcore.c to call CldModuleInit(char **argv). This function is declared in cldb.neighbour.c. It is defined as an extern in convcore.c and then called subsquently and this works perfectly.

So why is it not work for a user-defined function call? 

Thank you,
Hrushit



Archive powered by MHonArc 2.6.16.

Top of Page