Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Codewarrior Embedded > Link Error: Mul...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 387 of 414
Post > Topic >>

Link Error: Multiply-defined "blabla"

by "Jack" <jack4747@[EMAIL PROTECTED] > Jun 19, 2006 at 07:36 AM

Hi,
I'm new in programming with codewarrior.
I'm refactoring some code written by someone else for the Freescale
MC56F8013 .
I'm moving some function (that I'll use for other project) from the
main.c to another file (modbus.c). For the occasion I've created a
modbus.h which contains the functions prototypes and some global
variables that I need in the main.c file (and in some isr functions, so
I can't make them local).
In the modbus.h I've setted the:

#ifndef _MODBUS_
#define MODBUS_

UInt16  rx_cnt;

#endif

so there should not be any duplicate of the variables.

The problem is that when I link there is this error:

Link Error   : Multiply-defined: "Frx_cnt" in main.c
Previously defined in modbus.c

Any idea why there is this error and how to solve it?

Thanks Jack
 




 3 Posts in Topic:
Link Error: Multiply-defined "blabla"
"Jack" <jack  2006-06-19 07:36:41 
Re: Link Error: Multiply-defined "blabla"
"Jack" <jack  2006-06-19 07:38:12 
Re: Link Error: Multiply-defined "blabla"
"Jack" <jack  2006-06-20 05:25:17 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 14:18:24 CDT 2008.