Re: RtlMoveMemory not being found to link in



axtens wrote:

Using CVP I'm finding that compiling this fails with the following:
Linking...
Creating library Debug/BOAEF.lib and object Debug/BOAEF.exp
DFAXT.obj : error LNK2001: unresolved external symbol
_RTLCOPYMEMORY@12
Debug/BOAEF.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Can anyone give me an idea why the link isn't finding kernel32.lib?

That's not your problem. Note that the unresolved symbol is all upper case, while the aliases in the Win32 modules are always mixed case. This tells me that it is not seeing the definition of RtlCopyMemory from the module, so it is treating it as a Fortran routine with implicit interface. Since it is a subroutine, IMPLICIT NONE would not detect this.

I'm writing this from home where I don't have CVF installed, but if I try compiling your source with Intel Visual Fortran, I get errors about the mismatch of the first two arguments to RtlCopyMemory. These arguments are defined as address-sized integers, meaning that you have to pass LOC(arg) rather than the argument directly.

While looking at this I also noticed that the alias for RtlCopyMemory is actually _RtlMoveMemory@12. At first I thought this was a bug, but I note that there is no definition of _RtlCopyMemory@12 in kernel32.lib. I'll have to look into this to see what's going on, but at first blush this may be correct.

I suggest joining the Intel Visual Fortran user forum (see link below) where a lot of people familiar with using the Win32 API from Fortran hang out. CVF users are welcome there. I am missing some context from your last several posts, but it seems to me that you are thrashing around a lot and the problems you are seeing may be largely self-inflicted.
.



Relevant Pages

  • Re: win CE 6.0 build error - R3 with latest QFE(upto Aug 2009)
    ... Did you install QFEs after installing R3? ... As far as I know no QFEs were released since the release of R3. ... gwes_lib.lib: error LNK2001: unresolved external symbol ... : fatal error LNK1120: 18 unresolved externals ...
    (microsoft.public.windowsce.platbuilder)
  • how to resolve "error lnk 2001"
    ... I met this problem in executing a c++ project in visual studio. ... icarus_leastsquares.obj: error LNK2001: unresolved external symbol _dgels_ ... writeFidoFile(char *,int,int,unsigned char *)" ... Debug/reconstruction.exe: fatal error LNK1120: 21 unresolved externals ...
    (comp.lang.cpp)
  • linkage errors in release build with VS2005
    ... I am having linkage errors in my release build as ff: ... Class3.obj: error LNK2019: unresolved external symbol ... If I use the CRT Debug Dll in my "C++ code generation" setting, the errors go away - - also this is not pratical - i.e. will lead to run time crashes, since I cannot mix Debug dll and release dlls are memory is allocated differently between the two. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: NetApiBufferFree and DsGetDcNameW missing when build Kerberos.dll
    ... After installed the "Roll-up QEF to 2007", the Kerberos.dll was not created from sysgen. ... So I checked the build.log found the "kerberos.dll" link error LNK1120: 2 unresolved externals. ... Microsoft Incremental Linker Version 7.10.4017 ... kerberos.lib: error LNK2019: unresolved external symbol ...
    (microsoft.public.windowsce.platbuilder)
  • Prb building in Debug mode
    ... fine in Release mode, but when I switch to Debug, I get errors. ... SlaughterHelper.obj: error LNK2019: unresolved external symbol ... Debug\\ReadAcc.exe: fatal error LNK1120: 2 unresolved externals ...
    (microsoft.public.dotnet.languages.vc)