When trying to link my program, I receive the following errors:
error lnk2001: unresolved external symbol __imp__ExitProcces@4
error lnk2001: unresolved external symbol DefaultExceptionHandler
error lnk2001: unresolved external symbol stdio_newln
error lnk2001: unresolved external symbol stdio.puts
error lnk2001: unresolved external symbol $HardwareException
error lnk2001: unresolved external symbol Raise
I'm a newbie and I am running masm32 on win2k.
error lnk2001: unresolved external symbol __imp__ExitProcces@4
error lnk2001: unresolved external symbol DefaultExceptionHandler
error lnk2001: unresolved external symbol stdio_newln
error lnk2001: unresolved external symbol stdio.puts
error lnk2001: unresolved external symbol $HardwareException
error lnk2001: unresolved external symbol Raise
I'm a newbie and I am running masm32 on win2k.
The message is saying there is some variable/function declared in your code whos declaration is in some other object or lib file.
You've declared it as a symbol otherwise the error would be:
"c:\temp\ab\a.asm(15) : error A2006: undefined symbol : ExitProcess"
or something similar (basically linker error A2006 rather than A2001).
The ExitProcess function resides in kernel32.dll so you'll need to include the lib for it (kernal32.lib usually)!
It is a little unusual though, as you've got an unexpected "__imp" infront of the call....
It would be helpful if you posted the code....
Mirno
You've declared it as a symbol otherwise the error would be:
"c:\temp\ab\a.asm(15) : error A2006: undefined symbol : ExitProcess"
or something similar (basically linker error A2006 rather than A2001).
The ExitProcess function resides in kernel32.dll so you'll need to include the lib for it (kernal32.lib usually)!
It is a little unusual though, as you've got an unexpected "__imp" infront of the call....
It would be helpful if you posted the code....
Mirno
kernel32.lib, not kernal32.lib. I wonder why I see so many people
writing "kernal" from time to time... it isn't in my dictionary :).
The __imp_ prefix is not very strange, it probably just means you're
calling the import directly, instead of the j_import. The weird stuff
are stdio_newln, stdio.puts, Raise, and $HardwareException.
Are you trying to assemble the output of some C++ compiler, or link
an asm project to some C/C++ code?
writing "kernal" from time to time... it isn't in my dictionary :).
The __imp_ prefix is not very strange, it probably just means you're
calling the import directly, instead of the j_import. The weird stuff
are stdio_newln, stdio.puts, Raise, and $HardwareException.
Are you trying to assemble the output of some C++ compiler, or link
an asm project to some C/C++ code?
Hi,
I've got the same problem but with the SetLayeredWindowAttributes
API.
I have updated my user32.inc and add INCLUDELIB User32.lib
...so why do I have a "unresolved external symbol _SetLayeredWindowAttributes@16" error :confused:
I've got the same problem but with the SetLayeredWindowAttributes
API.
I have updated my user32.inc and add INCLUDELIB User32.lib
...so why do I have a "unresolved external symbol _SetLayeredWindowAttributes@16" error :confused:
PhoBos, your library files are probably too old. And anyway, you should
use GetProcAddress to import "fancy" stuff like SetLayeredWindowAttributes,
and only use them if they are available.
use GetProcAddress to import "fancy" stuff like SetLayeredWindowAttributes,
and only use them if they are available.
f0dder,
My User32.lib file comes from VS6 sp5 and i can use the API function in VS. I thought MASM can find it if I add it in my INC file...
But I will try using GetProcAddress.
Tx a lot.
My User32.lib file comes from VS6 sp5 and i can use the API function in VS. I thought MASM can find it if I add it in my INC file...
But I will try using GetProcAddress.
Tx a lot.
The inc file is not enough, you need to update your lib files as well.
Just copy all the VCSP5 lib files over your masm lib files, it should work.
Just copy all the VCSP5 lib files over your masm lib files, it should work.
Already done ! :(
Got always the same error...
Trying GetProcAddress.....
Got always the same error...
Trying GetProcAddress.....
All right, using GetProcAdress it works !!!
Tx for your help f0dder ! :)
Tx for your help f0dder ! :)