Compiling/Linking old C code in .NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to port some C code from an old VMS system to Windows 2003.
Recently, I've been having some problems with unresolved externals:

ccm_com error LNK2001: unresolved external symbol ___security_cookie
ccm_com error LNK2001: unresolved external symbol @__security_check_cookie@4
ccm_com error LNK2001: unresolved external symbol __chkstk
ccm_com error LNK2001: unresolved external symbol __fltused
ccm_com error LNK2001: unresolved external symbol __ftol2

I've tried a variety of solutions (including turning off the "buffer
security check"), but haven't had any success. Any assistance would be
greatly appreciated!

Thank you,

Curt
 
Sounds pretty typical. If you can figure out what these calls did, you can
create a proxy object that provides static methods that do something similar
(or nothing at all) and then you can link in the object to resolve the
links.

Sounds like the VMS system had some internal extensions to C that don't
exist on the MS platform.

--- Nick
 
Well, I've been able to reduce the bulk of my compilation errors by including
msvcrt.lib as one of the additional dependencies in the linker. I'm now down
to a total of 7 errors, with four of those errors on functions like stat,
fileno, and fstat.

I'm curious though - these functions are used (and compile properly) in
several libraries. When I link these libraries in with other code (to create
an executable), however, the compiler then chokes on the stat, fileno, and
fstat calls. What's the deal?
 
Back
Top