Error 112 Function Used But Not Defined
Error: Function used but not defined CCS Forum Index -> General CCS C Discussion View previous topic :: View next topic Author Message adamp524Joined: 06 May 2010Posts: 22 Compiler Error: Function used but not defined Posted: Thu Oct 27, 2011 8:16 am Hi, I'm writing code using the CCS compiler and want to use multiple files for the project but I'm getting the error: Error 112 ...... Function used but not defined: ...read_heading SCR=531 Here is the code I have below: main.c Code: #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up gcc warning: function used but not defined up vote 5 down vote favorite 3 https://www.ccsinfo.com/forum/viewtopic.php?p=153298 I am getting the warning: function used but not defined. I have static __inline__ in header file say a.h. The header file is included in a.c. I would like put all those inline function which are in header files into the .c files. Following code gives the idea of my problem. Orginal code: a.h: static __inline__ function1(){ function definition; } I changed: a.h: static function1(); a.c: #include "a.h" static function1(){ function http://stackoverflow.com/questions/5526461/gcc-warning-function-used-but-not-defined definition; } On doing above I got the warning: warning: function function1 is used but not defined. Could you please let me know why i am getting such warning? I would like to transfer all the __inline__ function into the .c so that I won't get the warning: warning: function1 is could not be inlined, code size may grow. Thanks in advance c gcc compiler-warnings share|improve this question edited Apr 2 '11 at 23:03 sarnold 77k12112161 asked Apr 2 '11 at 22:59 thetna 2,049125084 Please fix the code formatting in your code; it's a mess! –Lightness Races in Orbit Apr 2 '11 at 23:03 2 Remember to give a return type for every function - you're using C99 and C99 requires that. –Jonathan Leffler Apr 2 '11 at 23:09 add a comment| 3 Answers 3 active oldest votes up vote 22 down vote accepted You've declared the function to be static. This means that it is only visible within the current compilation unit. In other words: the implementation is only visible inside the a.c file. You need to remove the static keyword both in the a.h and a.c so that other .c files can see the function. You should specify a return value, e.g. void fu
a New Ticket Search: LoginNotifications Context Navigation ← Previous TicketNext Ticket → Opened 3 years ago Closed 3 years ago Last modified 3 years ago #25957 closed defect (bug) (fixed) jshint shouldn't throw errors: wp-includes/js/utils.js Reported by: adamsilverstein Owned by: nacin Milestone: 3.8 Priority: normal Severity: normal Version: Component: Build/Test Tools Keywords: needs-patch Focuses: Cc: Description fixing these: Linting src/wp-includes/js/utils.js ...ERROR [L67:C56] W109: Strings must use singlequote. var cookie = document.cookie, e, p = name + "=", b; Linting src/wp-includes/js/utils.js ...ERROR [L72:C32] W109: Strings must use singlequote. b = cookie.indexOf("; " + p); Linting src/wp-includes/js/utils.js ...ERROR [L77:C20] W041: Use '!==' to compare with '0'. if ( b != 0 ) Linting src/wp-includes/js/utils.js ...ERROR [L84:C31] W109: Strings must use singlequote. e = cookie.indexOf(";", b); Linting src/wp-includes/js/utils.js ...ERROR [L110:C37] W109: Strings must use singlequote. document.cookie = name + "=" + encodeURIComponent(value) + Linting src/wp-includes/js/utils.js ...ERROR [L111:C38] W109: Strings must use singlequote. ((expires) ? "; expires=" + expires : "") + Linting src/wp-includes/js/utils.js ...ERROR [L111:C53] W109: Strings must use singlequote. ((expires) ? "; expires=" + expires : "") + Linting src/wp-includes/js/utils.js ...ERROR [L112:C32] W109: Strings must use singlequote. ((path) ? "; path=" + path : "") + Linting src/wp-includes/js/utils.js ...ERROR [L112:C44] W109: Strings must use singlequote. ((path) ? "; path=" + path : "") + Linting src/wp-includes/js/utils.js ...ERROR [L113:C36] W109: Strings must use singlequote. ((domain) ? "; domain=" + domain : "") + Linting src/wp-includes/js/utils.js ...ERROR [L113:C50] W109: Strings must use singlequote. ((domain) ? "; domain=" + domain : "") + Linting src/wp-i