locked
How can I compile a WinRT Component DLL to a static lib

    Question

  • How can I compile a WinRT Component DLL to a static lib?
    There's no "Static library" Type in the Project's Configuration Type, how can i do this?

    Thank you.
    • Edited by linyehui Friday, December 30, 2011 2:09 AM
    Friday, December 30, 2011 2:08 AM

Answers

  • That's precisely type of feedback we are looking to hear from those using this Preview. Since this is not a released product, there is still opportunity for changes based on feedback we receive.

    Feedback for VS suggestions should be posted on this site. When you do, it really helps to post a link on this thread to your idea (C++ Static Library project type needed for Metro style apps) so others can vote up your suggestion on that site.

     

    At this time the answer is, that's not an available project type in the Developer Preview.

     

    Thanks,

    David

     

     


    Thursday, January 5, 2012 10:50 PM
    Moderator
  • To follow up on this, in Consumer Preview, this is now a valid project type.

    David Lamb

    Thursday, March 8, 2012 4:38 PM
    Moderator

All replies

  • Friday, December 30, 2011 7:30 AM
  • I think you should read this thread:  http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/73e8c131-1a2a-41b4-b028-6cefc5ad305f
    Best day, Best life
    Thank you for you reply. I has do some thing in that thread:
    I create a win32 static lib for my 3rdpatry code, like zlib
    but now I want compile my Metro component dll to a static lib, because the dll's export function will let out my code the secret.
    Should I build all the code in one project for protect my code?
    • Edited by linyehui Friday, December 30, 2011 12:44 PM
    Friday, December 30, 2011 12:43 PM
  • Could you explain the concern you have with protecting your code, what you are wanting to prevent?

    It might help if you described your overall objective. Are you wanting to provide some of your components to other parties for them to use, or is this all code internal to your application(s)?

     

    Thanks,

    -David


    Wednesday, January 4, 2012 9:37 PM
    Moderator
  • Hi David,
    Thanks for your reply
    Yes, we provide a component to other parties for them to use(by static lib in other platform iOS, Android)
    But in WinRT, we cannot compile it to be a static lib, and the export function will leak ours importment logic directly, it's unsafe to us.
    Now I'm planing to compile all of our code in one project :(
    • Edited by linyehui Thursday, January 5, 2012 2:41 AM
    Thursday, January 5, 2012 2:40 AM
  • That's precisely type of feedback we are looking to hear from those using this Preview. Since this is not a released product, there is still opportunity for changes based on feedback we receive.

    Feedback for VS suggestions should be posted on this site. When you do, it really helps to post a link on this thread to your idea (C++ Static Library project type needed for Metro style apps) so others can vote up your suggestion on that site.

     

    At this time the answer is, that's not an available project type in the Developer Preview.

     

    Thanks,

    David

     

     


    Thursday, January 5, 2012 10:50 PM
    Moderator
  • Thanks David
    Saturday, January 7, 2012 7:58 AM
  • To follow up on this, in Consumer Preview, this is now a valid project type.

    David Lamb

    Thursday, March 8, 2012 4:38 PM
    Moderator
  • Although static libraries are now a valid project type in the Consumer Preview, you get build error MSB8016 if you set the project's Metro Style App Support setting to Yes.  This problem has also been reported in this thread:http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/46746421-919e-433d-97bc-140fa25f323d

    So, this issue is still unresolved in VS 2011 Express Beta.

    Thursday, March 8, 2012 8:43 PM