Forum : ST7/STM8
Original Post
Post Information | Post |
---|---|
April 30, 2009 - 11:59pm
|
RIDE compiler gives no error for the functions with the same name but different case. However, linker gives error for the functions that have same name and different case. So my question: is RIDE linker not case sensitive while its linking the object files? |
Hi Smetha,
Check out the "-c" linker option, which makes it case sensitive.
IMHO you should never use functions whose name is distinguished only by case. Try to avoid this, as it may cause further problems in the future.
Regards,
Bruno
Thanks Bruno.
I'll take a look into it.
I don't usually define functions with the same name. I am using code generation tool that likes to define funtions with the same name distinguished by case.
Anyways thanks once again.
Hi,
I have two questions regarding case sensitiveness of linker and library manager.
1. I tried to use -c in more options area. I got the same error. I read the manual where it suggests me to use -c before input modules. I am not sure how to use this. Do I need to manually write out all the object file names after "-c"?
2. I was creating library application and I got the same error as linker. As in library application no linker is used, I am not sure if i can use -c to make library manager case sensitive.
Thanks
smehta
Hi Smetha,
The "-c" options is always passed on the linker's command line when using Ride7. You can omit it from the command-line, but then you have to call the linker from the command prompt or from a script. The "-c" option should be the first one on the comand-line.
I made the experiment of having:
in my application, everything goes fine. I can call MAIN() from main() with no problem.
Also I moved this MAIN() function to a different file in my application, still no problems, the build performs fine.
It looks like I cannot reproduce your problem!
So could you submit a small example that shows the error so that we can help you?
Thanks,
Bruno