I’m using VS 2008 and compile my application with Multi-threaded Debug (/MTd).
At link time I receive the following error:
error LNK2001: unresolved external symbol __environ
Where the symbol is defined?
Thanks
Dima
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you are using /Md (or variants), the symbols
_environand_wenvironare replaced by function calls. You need to track down the code that uses these (obsolete and deprecated) symbols, and make them use the proper function names. I found lots of people with the same problem as you in google also.I found some more detail here:
If you change the use of the symbol
_environto the wide character version_wenviron, your original code will probably work.