Visual Studio 2013 introduces source file (CPP) review, taking Fastdb as an example

Source: Internet
Author: User

Take Fastdb as an example, there are many demo Fastdb examples to use, c++demo how to use ..., with Visual Studio 2013

To the familiar person is too simple, unfamiliar person is childs ... Don't talk nonsense, on the steps ...
Material Preparation:
Fastdb source:http://www.garret.ru/fastdb.html
Tools: Visual Studio 2013

Open the Fastdb folder you will see there are Fastdb.sln, open the project, compile build DLL standby, because later also debug, so select Debug DLL

Next open the Fastdb/examples folder, see so many CPP files, casually open a bunch of code instantly a bunch of errors ... Suck the whole? Is it fastdb that the bastard who wrote the demo is Rusty ..., of course not, because you have all kinds of library, header files have not added ... (PS: Rise up, SAO years!) )

Open your Visual Studio 2013, where we don't write code just to run someone else's demo, so we create a new blank project.

Add a free demo of CPP file, here I chose Testdb.cpp

At this time Open is the error, (Sao year heart itch unbearable, a look can not find Fastdb.h head file, add is not, and then you will find out also can not run, because you add the fastdb.h also rely on other files, other files also rely on other files ..., of course you can eventually add, but why so hurt – ... ), that, let's open in the Visual Studio project right--〉 properties-〉 Configuration Properties-〉vc++ directory, locate the Include directory to add fastdb header file directory on the right fastdb/inc



Do you think you're done with this? Generate or Error: LNK2019: unresolved external symbol ...

I see, we haven't set the reference Lib yet.

If so, in the Visual Studio project right--〉 Properties-〉 linker-〉 General tab, locate the additional library directory and add the debug DLL folder that we just started building

Then switch to the Input tab to add the Fastdb.lib file, apply, OK ...

It's always going to be a smooth run ...

And then you'll find it's still not working. Tip: This program cannot be started because Fastdb.dll is missing from the computer. Try reinstalling the program to resolve this issue.

What's going on here ...
Although Visual Studio is very wise to find your header file, static lib, to help you complete the compilation, but the runtime can not find the DLL ...
So what do you do? My DLL is right there, you can't find it, idiot ...
There are many ways to add environment variables? (PS: Stop it, I just test it, maybe delete it tomorrow), simple is to copy your DLL file to C://windows, run again, OK

Hope to be a little help to the guys on the road, bye ^_^.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Visual Studio 2013 introduces source file (CPP) review, taking Fastdb as an example

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.