This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Error L127 & L128

I am getting the following error messages when compiling. I want to programm a can bus for the c167 using the service routines from the infineon homepage. Can anyone help me to solve the L127 & L128 errors.

It would be nice if i get a detailed solution, because a im a novice.

assembling START167.A66...
compiling prakt2.c...
compiling CHKBO16X.C...
compiling CHKMO16X.C...
compiling CHM1516X.C...
compiling CISR16X1.C...
compiling DEFMO16X.C...
DEFMO16X.C(78): warning C192: '=': value truncated
compiling INCAN16X.C...
INCAN16X.C(29): warning C2: 'GLOBAL': unknown #pragma/control, line ignored
INCAN16X.C(40): warning C2: 'PUBLIC': unknown #pragma/control, line ignored
INCAN16X.C(51): warning C140: '_bfld' undefined; assuming 'extern int _bfld()'
INCAN16X.C(114): warning C192: '=': value truncated
compiling LDMOD16X.C...
compiling RDM1516X.C...
compiling RDMOD16X.C...
compiling SNDMO16X.C...
linking...
*** ERROR L127: UNRESOLVED EXTERNAL SYMBOL
SYMBOL: _bfld
MODULE: INCAN16X.obj (INCAN16X)
*** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: _bfld
MODULE: INCAN16X.obj (INCAN16X)
ADDRESS: 00CCH
*** ERROR L128: REFERENCE MADE TO UNRESOLVED EXTERNAL
SYMBOL: _bfld
MODULE: INCAN16X.obj (INCAN16X)
ADDRESS: 00DCH
Program Size: data=694(near=692) const=44(near=44) code=1806
Target not created

Parents
  • INCAN16X.C(29): warning C2: 'GLOBAL': unknown #pragma/control, line ignored
    INCAN16X.C(40): warning C2: 'PUBLIC': unknown #pragma/control, line ignored
    INCAN16X.C(51): warning C140: '_bfld' undefined; assuming 'extern int _bfld()'
    You need to sort these warnings out first!

    Given that you have compiler warnings about undefined identifiers, and things called "PUBLIC" and "GLOBAL", you should not be in the least bit surprised that you subsequently get Linker problems with unresolved externals!

    As Hans-Bernhard has already pointed out, you seem to be using code written specifically for a different compiler - and this is exactly the sort of problem you're going to get if you don't pay attention to the implementation-specific details!

Reply
  • INCAN16X.C(29): warning C2: 'GLOBAL': unknown #pragma/control, line ignored
    INCAN16X.C(40): warning C2: 'PUBLIC': unknown #pragma/control, line ignored
    INCAN16X.C(51): warning C140: '_bfld' undefined; assuming 'extern int _bfld()'
    You need to sort these warnings out first!

    Given that you have compiler warnings about undefined identifiers, and things called "PUBLIC" and "GLOBAL", you should not be in the least bit surprised that you subsequently get Linker problems with unresolved externals!

    As Hans-Bernhard has already pointed out, you seem to be using code written specifically for a different compiler - and this is exactly the sort of problem you're going to get if you don't pay attention to the implementation-specific details!

Children