Ethereal-dev: [Ethereal-dev] _DllMain@12 already defined
Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.
I make a VC++ project to compile ethereal to a DLL, finally, I
got this error
--------------------------------------------
single-threaded and multithreaded libraries
mfcs42d.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already
defined in MSVCRTD.lib(dllmain.obj) mfcs42d.lib(dllmodul.obj) : warning
LNK4006: _DllMain@12 already defined in MSVCRTD.lib(dllmain.obj); second
definition ignored --------------------------------------------
I see the MSDN explanation
One of the following may be a cause:
- The most common cause of this error is accidentally linking with both the
single-threaded and multithreaded libraries. Ensure that the application
project file includes only the appropriate libraries and that any third-party
libraries have appropriately created single-threaded or multithreaded
versions.
- The given symbol was a packaged function (created by compiling with
/Gy) and was included in more than one file but was changed between
compilations. Recompile all files that include the symbol.
- The given symbol was defined differently in two member objects in
different libraries, and both member objects were used.
- An absolute was defined twice, with a different value in each definition.
whether I linking with both the single-threaded and multithreaded
libraries or DLLmain define twice?
could you tell me how to solve it?
if you need source code, I will send it to you?
Frank Li
|