When I link a .lib(written with msvc) with my asm obj, something likes: "unresolved external symbol _main" comes out, how to solve it?
Ivan, It means your module has a dependency that is not available, I would have a good look at the VC source to see what it is looking for with the call to _main. Just check that you have not linked the library in the first place with a C runtime library that is not available. Regards, firstname.lastname@example.org
In my MSVC lib, I have just used some IO functions, there's only "windows.h" included, I have tried to reduce the lib with only one "fopen" call(thus one line), and the problem still alive. Please help me.
That's the problem. fopen requires the C startup module. I believe _main is defined in the startup module. If not, it is called by the startup module to invoke the main() function, the standard C "startup" function. In the second case, your ASM code must have a PUBLIC label called main or _main, and this will be your pseudo-start label.