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

HOW .... to include library C51s.lib ???

I am doing inline assembly. All works except unresolved external.
OK I KNOW WHY.

BUT HOW DOES ONE INLCUDE THE MISSING LIBRARY IN THE IDE ?

Specifically, what dialog, what text to enter where ?

The "help" says "BL51 inputlist, CxxFPS.LIB, CxxS.LIB NODEFAULTLIBRARY"

... what is this ? ... where is this ?

Project Options for Target ....

BL51 Misc ??? ... but WHERE and WHAT ???

  • Keil does this by translating all the 'C' source to assembly, and then passing that through the assembler.

    A result of this is that the linker no longer "knows" that you had 'C' source, so it doesn't do all the automatic 'C' support stuff that it otherwise would - including adding all the support libraries.

    One way around this is to ensure that you still have a main() function which is pure 'C' - ie, not translated via assembler. That will ensure that the Linker knows what to do...

    Good night, and may your god go with you.

  • I am doing inline assembly.
    Actually, the symptoms you get typically come from severely overdoing inline assembly. You get those symptoms by turning on the SRC directive for every C source file in your program. Don't do that, particularly not at the rather limited level of experience with the tools you have right now.

    That set aside, whatever your reason for doing so, inline assembly is almost certainly the wrong way to get there. In C51, even more than most other other compilers, the achievable positive effects of inline assembly are quite a bit smaller than most people think --- and the negative side-effects much bigger.

    I strongly suggest you leave the whole idea of inline assembly alone for quite while yet. You'll have to be much better at all this before this becomes a tool that you can really profit from.

  • I strongly suggest you leave the whole idea of inline assembly alone for quite while yet. You'll have to be much better at all this before this becomes a tool that you can really profit from.
    my version is shorter"
    "I strongly suggest you leave the whole idea of inline assembly alone"

    if something gain an advantage from inline assembly (less than you think will) DO NOT use inline assembly, write the function in assembler in an assembly module.

    Erik