How to enable NASM in Dev-C++?
It give me such Link error:
[Linker error] undefined reference to `setvect'
In my project , setvect is defined in the asm file .
How to enable NASM in Dev-C++?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:How to enable NASM in Dev-C++?
if you can locate something like "do not prepend underscore to symbol names", click it.
otherwise, try renaming "setvect" in "_setvect" in the asm file: MS-* platforms traditionally prepend an underscore to every C-generated symbol, and thus equivalently to extern (unresolved) symbols that you'll write in assembly.
An objdump-like tool should confirm you the symbol tables from the C/C++ part expects _setvect instead of setvect.
Of, make sure you've declared it as a "C" stuff too, or name mangling will be trying to translate it into something like __v7setvectiie or whatever the MS name mangling policy will find appropriate.
otherwise, try renaming "setvect" in "_setvect" in the asm file: MS-* platforms traditionally prepend an underscore to every C-generated symbol, and thus equivalently to extern (unresolved) symbols that you'll write in assembly.
An objdump-like tool should confirm you the symbol tables from the C/C++ part expects _setvect instead of setvect.
Of, make sure you've declared it as a "C" stuff too, or name mangling will be trying to translate it into something like __v7setvectiie or whatever the MS name mangling policy will find appropriate.
Re:How to enable NASM in Dev-C++?
Oh,sorry.I haven't make the problem clear to you.Pype.Clicker wrote: if you can locate something like "do not prepend underscore to symbol names", click it.
otherwise, try renaming "setvect" in "_setvect" in the asm file: MS-* platforms traditionally prepend an underscore to every C-generated symbol, and thus equivalently to extern (unresolved) symbols that you'll write in assembly.
I meant to say all functions written in asm can't be found.
To be more clear, I can find any myasm.o file after compiling.
So,I think that's because I haven't set the enviroment for asm correctly.
The question may be changed to "how to let Dev-C++ support ASM?"
- kataklinger
- Member
- Posts: 381
- Joined: Fri Nov 04, 2005 12:00 am
- Location: Serbia
Re:How to enable NASM in Dev-C++?
Did you mark symbols which you want to export from ASM sa [global]?
Re:How to enable NASM in Dev-C++?
Yes.kataklinger wrote: Did you mark symbols which you want to export from ASM sa [global]?
Re:How to enable NASM in Dev-C++?
I think the question is more about how to cause Dev-C++ to invoke the assembler. I can't help with Dev-C++, though.
Re:How to enable NASM in Dev-C++?
Quite exactly.Phugoid wrote: I think the question is more about how to cause Dev-C++ to invoke the assembler. I can't help with Dev-C++, though.
Can anyone help?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:How to enable NASM in Dev-C++?
google seems to have interesting pointers ...
Otherwise, that's more a matter of digging your dev-c++ manuals than a matter of OS development knowledge.
Otherwise, that's more a matter of digging your dev-c++ manuals than a matter of OS development knowledge.