VB and C++ RRS feed

  • Question

  • can I with VS 2017 programming VB and then compile in c++ .


    Saturday, December 15, 2018 1:24 PM

All replies

  • If you compile each in a different project them add a reference to one from the other that will work. What you can't do is have two programming languages in one project as per your question.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Saturday, December 15, 2018 2:23 PM
  • Forgive me if this seems like nit-picking, but there is a difference between C++ projects and C++/CLI projects.

    A reference to a project that creates a C++ dll cannot be added to a VB.net project.

    If one creates a VC++ CLR class library (i.e. C++/CLI) or adds /clr for common language runtime support to a Win32 Dll project then adding a reference is possible.

    Saturday, December 15, 2018 5:44 PM
  • You just can't right-click References and left-click Add Reference and reference a plain C/++ dll that way.

    Well, that's what I said.  I'm not talking about p/invoke.
    Sunday, December 16, 2018 5:34 AM