Jump to content


CMAKE Install issue on Vista


4 replies to this topic

#1 hellhound_01

    New Member

  • Members
  • PipPip
  • 58 posts

Posted 11 May 2011 - 08:24 AM

Hello,

actual I'm struggling with CMAKE INSTALL command on Windows Vista, when I try to copy the resulting DLL to the system32 folder using this command:


INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/lib${LIBRARY_NAME}.dll DESTINATION $ENV{SYSTEMROOT}/System32/) 


On XP this command could be used without any failure. On Vista i got the error message that the dll could not copied. Any suggestions?

Thanks for any hint.
Best regards.

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 5311 posts
  • LocationSanta Clara, CA

Posted 11 May 2011 - 05:44 PM

It's probably a permissions issue; in Vista / Windows 7 with the default setup you have to elevate to admin privelege level to touch anything on the hard drive outside your own user account directory. Try running the install from a command line with admin privs (typically you can right-click on a shortcut and choose "Run as administrator").
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 hellhound_01

    New Member

  • Members
  • PipPip
  • 58 posts

Posted 12 May 2011 - 06:07 AM

I'm running vista generally in administration mode. It seems to me that cmake has not the permission to execute this command running the script from my MSYS/MinGW environment. Is it possible to give cmake those permissions?

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 5311 posts
  • LocationSanta Clara, CA

Posted 12 May 2011 - 06:15 AM

Unfortunately there is no Windows equivalent of "sudo" AFAIK. You have to run the command prompt / shell, or whatever parent process you're initially launching, with admin privs; then subprocesses will inherit those privs. You still have to explicitly elevate things even if your user account is set up as an admin account. It's dumb, but that's the way it is, to date.
reedbeta.com - developer blog, OpenGL demos, and other projects

#5 hellhound_01

    New Member

  • Members
  • PipPip
  • 58 posts

Posted 12 May 2011 - 06:32 AM

Hmm okay. I will try to start up the mingw environment with admin privileges.
Damn Microsoft didoes ... Thanks for your help.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users