Jump to content
Sign in to follow this  
wuwuxin

C++ Builder bcc32c (Clang 32bit) cannot find symbol for inline function in DEBUG build

Recommended Posts

I have an inline function defined in  a C file,  lp_pricePSE.c  

 

INLINE MYBOOL applyPricer(lprec *lp)
{
  int rule = get_piv_rule(lp);
  return( (MYBOOL) ((rule == PRICER_DEVEX) || (rule == PRICER_STEEPESTEDGE)) );
}

 

C++ Builder bcc32c (Clang 32bit compiler)DEBUG build would give me the following error:

 

[ilink32 Error] Error: Unresolved external '_applyPricer' referenced from C:\OBJ\WIN32\DEBUG\LP_PRICEPSE.OBJ

However,  if I use classic Borland Compiler bcc32, OR   use bcc32c (i.e, the Clang 32 compiler)  do RELEASE build,  then the above problem won't happen.

 

Is this a known issue, or there is something with bcc32ci (the Clang 32 bit compiler) that I set up wrong? @Remy Lebeau

Edited by wuwuxin

Share this post


Link to post

what happens if you replace MYBOOL with bool and PRICER_DEVEX and PRICER_STEEPSTEDGE with plain integer constants (eg 2 or 3 or 4....) ? If you get the same problem then this would be a more helpful form to post your problem source code (since your quoted code does not include definitions of these block capital items). Or, if it starts working, can you include the definitions we need to get the code to be like yours (in this case it could be that MYBOOL is being defined differently in the debug and release compilations for example....)

 

  • Thanks 1

Share this post


Link to post
Guest

I think the problem is a result of inlined function name adjustment with "_", so if removing the inline identifier will make it work then google for this specific problem, i am not a much help in this case, also have a look at this section "C99 inline functions" on this page

https://clang.llvm.org/compatibility.html 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×