Hi Grant,
I'm trying to implement your idea.
I have one problem however. In the first link procedure, some functions are
declared but defined in the application code. In other words, our code calls
functions (say foo) that will be implemented in the application.
I declared them as extern in our code, telling the linker that it is defined
somewhere else. However, it still doesn't link and tells me:
"undefined reference to foo"
My colleague does the same using the standard gcc and it works.
Do you have any suggestions?
Yvan
From: Grant Edwards <gra...@visi.com>
Reply-To: "GCC for MSP430 - http://mspgcc.sf.net"
<mspgcc-users@lists.sourceforge.net>
To: mspgcc-users@lists.sourceforge.net
Subject: Re: [Mspgcc-users] Making and adding a library without msp430-ar
Date: Wed, 14 Jun 2006 13:51:58 +0000 (UTC)
On 2006-06-14, David Brown <da...@westcontrol.com> wrote:
> Symbols that span seperate files must be visible to the linker, and must
> therefore be in your object files (either as individual object files, or
> combined in a library). Everything that is local to a single file can
be
> declared "static", and thus hidden.
>
> If you want only a limited subset of your global symbols to be visible
> (i.e., application-usable symbols but not internal library symbols),
then I
> can only think of two ways to do it. One is to combine your code into a
> single large C file so that there are no internal library global symbols
> (they can be declared static). You'd want to automate this in some way,
so
> that you can write, test and debug the code as separate modules, and
only
> combine them for release. The other way is to help get the gcc 4.1
version
> of mpcgcc finished, as gcc4.1 is able to do this sort of thing itself.
The third option is to link the object modules together then strip
them (keeping only the symbols he wants to be visible).
--
Grant Edwards grante Yow! .. here I am in 53
at B.C. and all I want is
a
visi.com dill pickle!!
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users