When I link a .lib(written with msvc) with my asm obj, something likes: "unresolved external symbol _main" comes out, how to solve it?
Posted on 2001-02-25 05:33:00 by Ivan Wong
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, hutch@pbq.com.au
Posted on 2001-02-25 06:31:00 by hutch--
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.
Posted on 2001-02-25 23:10:00 by Ivan Wong
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.
Posted on 2001-02-26 21:13:00 by tank