Visual Studio C++ - unresolved symbol __environ -
I am using VS 2008 and compiling my application with multi-threaded debug (/ MTD). At the link time, I get the following error:
Error LNK2001: Unsolved external symbol __ environment
Where is the symbol defined?
Thanks Dima
When you are using / MD (or variants) , The symbol is replaced by the _environ
and the _wenver
function calls. You need to track the codes that use these (obsolete and excluded) symbols, and make them. I also have the same problem as you are in
I have found some more detail:
In the Unicode context, the poll is _nonver meaningless when the MD / or MDD linkage is used for the CRT DLL program Type (wide or multibyte) is unknown. Only multibait type has been made because it is most likely.
If you use the symbol _environ
in the extensive character version _wen
, your original code probably will work.
Comments
Post a Comment