Module Linking Errors

Brad Bonkoski bradb59@home.com
Thu, 22 Mar 2001 16:39:38 -0700


Well....

The problem I faced was trying to be too fancy and including function
definitions in the header files.  (trying to be overly organized I
suppose).  So, the problem was the linker was having problems with the fact
that those definitions we in the header file.  So, what I did was made a
seperate *.c file in which I placed the function definitions in, and then I
put the prototypes in a header file so I was able to share those functions
when everything was linked together.  Hope that makes sense...
-Brad

Alan Dayley wrote:

> Resolved how?  Share the wealth.
>
> Alan
>
> At 03:33 PM 3/22/01 -0700, you wrote:
> >All,
> >This problem has been resolved.  Apologize for the noise.
> >-Brad
> >
> >Brad Bonkoski wrote:
> >
> >> Hello,
> >> Having problems again...
> >> I have a kernel module with multiple *.c files.  In my Makefile I am
> >> comiling them
> >> independantly, and then linking them together with 'ld -r'
> >> The problem I have is that for the *.c files to comile independantly
> >> they require all of
> >> the header files.  But when I link them I get an error saying:
> >> redifinition of <typedef> first defined <here>
> >> Of course they are the same definition because they include the same
> >> file.  Any insight
> >> into how I could resolve this would be appdreciated.
> >> -Brad
> >>
> >> _______________________________________________
> >> Plug-devel mailing list  -  Plug-devel@lists.PLUG.phoenix.az.us
> >> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
> >
> >
> >_______________________________________________
> >Plug-devel mailing list  -  Plug-devel@lists.PLUG.phoenix.az.us
> >http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
> >
> >
> >
> /------------------------------------------
> |Alan Dayley             www.adtron.com
> |Software Engineer       602-735-0300 x331
> |ADayley@adtron.com
> |
> |Adtron Corporation
> |3710 E. University Drive, Suite 5
> |Phoenix, AZ  85034
> \-------------------------------------------
>
> _______________________________________________
> Plug-devel mailing list  -  Plug-devel@lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel