Home > Software engineering > Call DLL, debug and normal, release an error "unable to locate the ordinal number... In the dyn
Call DLL, debug and normal, release an error "unable to locate the ordinal number... In the dyn
Time:09-18
I use the visual studio 2010 c + + program of the console, calling a third-party dynamic link library GMSH, provided the h issuer, lib and DLL files, only one version, does not distinguish between the debug/release (later checked with depend software DLL, should be release version),
With the method of static imports, a call the library in the debug mode operation is normal, but compiled into the release after the operation error, DLL under the corresponding exe path, Error: unable to locate ordinal number 1271 in the dynamic link library... Xx. Exe
Use depend to check the release version exe files as follows, did find call within the Ordinal Numbers and DLL function can't corresponding
In addition, in MFC100. DLL here also appeared the ordinal number 1272
Reoccupy depend to see the debug version exe files as follows, doesn't seem to have the above problems
Can you tell me the problem how to solve? thank you
CodePudding user response:
Add: Call about the library, at the beginning of a compilation is pass, according to a large number of LNK2005 redefine error, searched, found that the reason is quite likely the main program of the CRT versions do not match the version of the CRT and third-party library cause, the solution is to add linker on the command line "/FORCE: MULTIPLE" instruction, so a lot of error to the warning, compile, debug version of the program can be run correctly, but the current release version appeared the problem described above,
Don't know whether the two problems are linked
CodePudding user response:
Is the best way to ensure exe and DLL runtime libraries are consistent, the debug and release are corresponding well