VS2010 ATL DLL 프로젝트를 Windows 7에서 빌드하니 아래와 같은 에러가 발생했다.
등록하다가 에러가 발생했다는 것인데 보나마나 그놈의 UAC 문제와 비슷한 것일 것이다.
1> D:\Z\VS2010ATL\Debug\VS2010ATL.lib 라이브러리 및 D:\Z\VS2010ATL\Debug\VS2010ATL.exp 개체를 생성하고 있습니다. 1>LinkEmbedManifest: 1> VS2010ATL.vcxproj -> D:\Z\VS2010ATL\Debug\VS2010ATL.dll 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(732,5): warning MSB3075: "regsvr32 /s "D:\Z\VS2010ATL\Debug\VS2010ATL.dll"" 명령이 종료되었습니다(코드: 5). 이 명령을 실행할 수 있는 권한이 있는지 확인하십시오. 1> ContinueOnError=true로 작업을 호출했으므로 이전 오류가 경고로 변환되었습니다. 1> "Exec" 작업의 "ContinueOnError"이(가) "true"(으)로 설정되어 있으므로 빌드가 계속됩니다. 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(744,5): error MSB8011: 출력을 등록하지 못했습니다. 사용자 단위 리디렉션을 사용하도록 설정하거나 높은 권한으로 명령 프롬프트에서 구성 요소를 등록하십시오. |
잠시 구글을 뒤져보니 아래 링크에 간단한 해결책이 있었다. 내가 사용한 Li Shao의 설명 부분만 옮겨놓았다.
http://social.msdn.microsoft.com/Forums/en/vcprerelease/thread/11f01ceb-52a4-438f-b7ef-727ce7a3e191
Starting from Windows Vista, including Vista, Win2008 Server, Windows7, build process cannot write to HKEY_CLASSES_ROOT (HKCR) hives unless the process is started as administrator. To be able to register in non-administrator mode, VS2008 and VS2010 offer the feature of "registrer per user". The registration information is written to HKEY_CURRENT_USER (HKCU). You can set Linker -> General -> Per User ReDirections to "true" if Linker -> General -> Register Output is set to "true if you use the built registration step of the project system. If you have your own custom registration step, you can use the per user registration command: regsvr32 /s /n /i:user "xxxx.dll". If VS2010 is installed on Windows XP, you don't need to have the elevated privilege or per user registration to register your application since the security requirement is OS specific. Li Shao, MSFT |
