Linker warnings in Debug x64 build /MT

c++ / delphi package - dll injection and api hooking

Linker warnings in Debug x64 build /MT

Postby _NN_ » Thu Jul 12, 2018 12:44 pm

Debug x64 platform:
I have project with Multithreaded CRT (/MT not /MD).
The project compiled in Debug with the madCHook mt lib get following:
Code: Select all
1>LIBCMTD.lib(initializers.obj) : warning LNK4098: defaultlib 'libcmt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library


Another issue with Debug Win32 platform:
Code: Select all
1>madCHook32.lib(madCHook.obj) : warning LNK4202: spawning full build due to '/INCREMENTAL:NO' directive
1>madCHook.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
_NN_
 
Posts: 43
Joined: Mon Jan 21, 2013 4:00 pm

Re: Linker warnings in Debug x64 build /MT

Postby madshi » Wed Jul 18, 2018 8:06 am

I hate MSVC++, so many stupid linker problems. Are these warnings a real big problem, or is it just a cosmetical issue?
madshi
Site Admin
 
Posts: 9774
Joined: Sun Mar 21, 2004 5:25 pm

Re: Linker warnings in Debug x64 build /MT

Postby _NN_ » Wed Jul 18, 2018 11:08 am

If you switch from EditAndContinue to simple PDB and turn off incremental linking, there is no warning.
It just the project default ;)
_NN_
 
Posts: 43
Joined: Mon Jan 21, 2013 4:00 pm

Re: Linker warnings in Debug x64 build /MT

Postby madshi » Wed Jul 18, 2018 12:03 pm

Ah I see, that should be easy enough! :)
madshi
Site Admin
 
Posts: 9774
Joined: Sun Mar 21, 2004 5:25 pm

Re: Linker warnings in Debug x64 build /MT

Postby madshi » Thu Jul 19, 2018 12:24 pm

So here's a new test build:

http://madshi.net/madCollectionBeta.exe

It now contains 32bit static libs created with MSVC++ (2005). I didn't actually find a setting for "incremental linking", when creating lib files. The 32bit static lib you've been working with is created from the Delphi sources, by using some external conversion tools. Maybe those tools made it appear as if the static lib were built with "incremental linking"? I've no idea.

P.S: The new build also contains the new DLL injection method as an option. See USE_IAT_DLL_INJECTION. It requires your hook DLL to have an exported function, though, otherwise it won't work. And the biggest disadvantage: Uninjection no longer works, because the OS considers your hook DLL statically linked.
madshi
Site Admin
 
Posts: 9774
Joined: Sun Mar 21, 2004 5:25 pm


Return to madCodeHook

Who is online

Users browsing this forum: Google [Bot] and 4 guests