[RESOLVED] how add libraries\include on Visual Studio 2017 options?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Thread: [RESOLVED] how add libraries\include on Visual Studio 2017 options?

  1. #1
    Join Date
    Apr 2009
    Posts
    1,182

    [RESOLVED] how add libraries\include on Visual Studio 2017 options?

    every time that i create a DirectX project(for example) i must add the libraries\include on project properties.
    can i add it on tools for i not, again, add on a new project?

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,043

    Re: how add libraries\include on Visual Studio 2017 options?

    You can define a library to be used within the code rather than using properties using #pragma comment. See the lib section of https://msdn.microsoft.com/en-us/library/7f0aews7.aspx

    eg
    Code:
    #pragma comment(lib, "mylib")
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2017 (15.5.7)

  3. #3
    Join Date
    Apr 2009
    Posts
    1,182

    Re: how add libraries\include on Visual Studio 2017 options?

    but 1st i must add the directory on project properties... can i add it just once for i use it on new projects?

  4. #4
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,043

    Re: how add libraries\include on Visual Studio 2017 options?

    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2017 (15.5.7)

  5. #5
    Join Date
    Apr 2009
    Posts
    1,182

    Re: how add libraries\include on Visual Studio 2017 options?

    i'm sorry, but i belive that my Visual Studio 2017 don't have that
    i'm trying understand that without success

  6. #6
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,043

    Re: how add libraries\include on Visual Studio 2017 options?

    Quote Originally Posted by Cambalinho View Post
    i'm sorry, but i belive that my Visual Studio 2017 don't have that
    i'm trying understand that without success
    Yes it does. View/Property Manager. This displays the property manager window. Then follow as in the link in post #4 for creating a new property sheet etc.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2017 (15.5.7)

  7. #7
    Join Date
    Apr 2009
    Posts
    1,182

    Re: how add libraries\include on Visual Studio 2017 options?

    i must add a new item:
    Name:  Sem Título.jpg
Views: 36
Size:  30.0 KB
    i did, but i miss something: i must add that file on others projects?

  8. #8
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,043

    Re: how add libraries\include on Visual Studio 2017 options?

    If you want to add - as opposed to modify existing - then you add for a specific configuration/platform (eg release/x64). This then applies to all new solutions for that configuration/platform. If you just want to specify additional library directories you could just modify the appropriate Microsoft.cpp.Win32.user.
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2017 (15.5.7)

  9. #9
    Join Date
    Apr 2009
    Posts
    1,182

    Re: how add libraries\include on Visual Studio 2017 options?

    finally i found 1 problem here: the Property Manager and the Class View was hided. now it's showed.
    then i changed the Microsoft.cpp.Win32.user for debug and release(32 and 64) with x86 and x64 directories.
    after that i closed the IDE. when i create the new project, the lib\inclued are add, but i'm confused: on Property Manager i see, now, 2 projects:
    Name:  Sem Título.png
Views: 31
Size:  9.1 KB
    what you can tell me?

  10. #10
    Join Date
    Apr 2009
    Posts
    1,182

    Re: how add libraries\include on Visual Studio 2017 options?

    after reopen the Project5, the Property Manager only show us 1 project.. so was just a bug.
    thanks or all... thank you sou much.
    you said everything, but i'm new with VS2017 and the Property Manager and the Class View was hidden, so was more difficulty to understand it.
    thank you so much for all

  11. #11
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,637

    Re: how add libraries\include on Visual Studio 2017 options?

    Quote Originally Posted by Cambalinho View Post
    after reopen the Project5, the Property Manager only show us 1 project.. so was just a bug.
    thanks or all... thank you sou much.
    you said everything, but i'm new with VS2017 and the Property Manager and the Class View was hidden, so was more difficulty to understand it.
    thank you so much for all
    You might want to go online and see some tutorials or watch youtube videos to help you get acquainted with Visual Studio 2017. If you take the time to do this, it will help you now, and will help you when a new version of Visual Studio comes out. With few exceptions, Visual Studio usually retains existing functionality - sure they may move things around, but if you are familiar with the environment, it isn't hard to figure where things are.

  12. #12
    Join Date
    Apr 2009
    Posts
    1,182

    Re: [RESOLVED] how add libraries\include on Visual Studio 2017 options?

    you have right. but the MSDN is avoiding some things on Visual Studio 2017, because of been a Multi-Platform and compatible with rest.

  13. #13
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,637

    Re: [RESOLVED] how add libraries\include on Visual Studio 2017 options?

    Quote Originally Posted by Cambalinho View Post
    you have right. but the MSDN is avoiding some things on Visual Studio 2017, because of been a Multi-Platform and compatible with rest.
    Not sure what you mean. Visual Studio has been multi-platform since 1998 and maybe before that. Since about 2001, Visual Studio has been a 'container' application that supports multiple 'language' and environment plugins.

    When you look things up in MSDN, you need to drill down to the particular language or get help on shared Visual Studio IDE topics. Language specific topics often have a 'version' dropdown which may change the help content for the version you are working under.

    If you aren't familiar with VS or aren't used to looking up info in MSDN, it's easy to miss things and assume "it's not there."

  14. #14
    Join Date
    Apr 2009
    Posts
    1,182

    Re: [RESOLVED] how add libraries\include on Visual Studio 2017 options?

    yes you have right. that's way, on hard way, i learned.
    wasn't easy to catch all things, but reading here and there, i found them(and some testing ideas)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)