Tag Archives: visual-studio

How I fixed “error LNK2005: _DllMain@12 already defined in msvcrtd.lib”

Today I got “error LNK2005: _DllMain@12 already defined in msvcrtd.lib” while linking some C++ CLI project with MFC support in MS Visual Studio 2013. As described in A LNK2005 error occurs when the CRT library and MFC libraries are linked in the wrong order in Visual C++A LNK2005 error occurs when the CRT library and MFC libraries are linked in the wrong order in Visual C++ article, I added /verbose:lib linker option:

MS Visual Studio Linker options

(more…)

Combining XAML and DirectX together in a WinRT application

With the release of Windows 8, Microsoft introduced a grate technology for combining XAML and DirectX together, letting us to place XAML controls over intensive real-time graphics, see DirectX and XAML interop (Windows Runtime apps using DirectX with C++) for more details.

You can easily download and build sample XAML SwapChainPanel DirectX interop sample demonstrating how it works. All that you need is Visual Studio 2013 with installed license. After the license is installed Visual Studio 2013 shows the following dialog:

Visual Studio 2013 license

(more…)

How to install updates to MS Visual Studio 2013

Select from the main menu of VS 2013 Tools->Extensions and Updates and in opened dialog press Update button under Product Updates:

updates to MS Visual Studio 2013

it will start downloading an installation file. When download completes close Visual Studio and run the installation file.

How to compile BOOST with MS Visual Studio 2010-2017

Fortunately, to compile BOOST with MS VC 2010 we need Visual Studio Command Prompt and five commands:

Navigate to BOOST directory, for example:

F:
cd F:\Projects\Lib\boost_1_53_0

(more…)

Visual Studio 2012 supports Visual SourceSafe

If you installed Visual Studio 2012 and all its source control related menu items shows only TFS, do not panic, Visual Studio 2012 supports Visual SourceSafe very well! The only thing that you need to do is to select source control plug-in under Tools->Options menu:

Visual Studio 2012 supports Visual SourceSafe

How to make PHP Web Service with NuSoap

While investigating how to create a Web Service in PHP I run into NuSoap library, that can generate WSDL based on some matadata describing Web Service method signatures and the data structures. I downloaded NuSoap library and found some trivial sample that started working after adding the highlighted line of code:

(more…)

Seeing design time data in a WPF control

Sometimes the ability to see the data at design time significantly facilitates the creation of WPF controls. If I am developing a WPF control with complex UI using data bound controls, I usually define a property for accessing some typical data item:

public static ComplexData DesignTimeItem
{
    get
    {
        using (DatabaseContext db = new DatabaseContext())
        {
            var products = from p in db.products.Include("ProductType")
                           where p.product_id == 131
                           select p;

            product product = products.First();

            return new ComplexData(product, "100 kg");
        }
    }
}

(more…)