NO

Author Topic: Compiling with /MD, unresolved externals.  (Read 3639 times)

Trouba

  • Guest
Compiling with /MD, unresolved externals.
« on: October 30, 2009, 07:16:20 PM »
Hi, when compiling using the multi-threaded dynamic version of the runtime library (/MD switch) I ended up with this linker errors:

POLINK: error: Unresolved external symbol '__imp__CreateProcessA@40'.
POLINK: error: Unresolved external symbol '__imp__WaitForSingleObject@8'.
POLINK: error: Unresolved external symbol '__imp__CloseHandle@4'.
POLINK: error: Unresolved external symbol '__imp__GetLastError@0'.
POLINK: error: Unresolved external symbol '__imp__FormatMessageA@28'.
POLINK: error: Unresolved external symbol '__imp__LocalFree@4'.

Any info on how to solve them? Are they not defined in the dynamic version of the CRT?

Thank you.


JohnF

  • Guest
Re: Compiling with /MD, unresolved externals.
« Reply #1 on: October 31, 2009, 08:40:34 AM »
Those API's are from kernel32.lib

John

Trouba

  • Guest
Re: Compiling with /MD, unresolved externals.
« Reply #2 on: November 01, 2009, 10:41:16 AM »
Thank you, strange behavior it has.

If using /MT it links automatically to kernel32.lib, if linking using /MD you have to specify kernel32.lib as a library to link to.