Hello all expert C programmer and hacker, i truly a noob in this field.
I have a program that print stack pointer but i don't really know its underlying concept.
I hope you all can explain it to me. When i try to compiled this program , unresolve external symbol means i didn't finish up the function definition
Below is my program :
Quote:
// A little program to print stack pointer
#include<stdio.h>
int main()
{
printf("0x%x\n", get_sp());
return 0;
}
unsigned long get_sp()
{
__asm__("movl %esp,%eax");
}
|
Quote:
--------------------Configuration: StackPointer. - Win32 Debug--------------------
Linking...
StackPointer..obj : error LNK2001: unresolved external symbol ___asm__
Debug/StackPointer..exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
StackPointer..exe - 2 error(s), 0 warning(s
|
I used MS VC 6.0 ++ on MS platforms.
A billion thanks for your help.