LIBUV problems with compiling and using Windows

Source: Internet
Author: User

1. Download Source: http://dist.libuv.org/dist/

I downloaded the v1.8.0 version and opened to see four files, as follows:


Description:. tar.gz version of the source files can be compiled in Linux and Windows, at the end of the EXE is the installation files, Windows according to their needs to choose. However, the emphasis is that, after the installation of the program at the end of the. exe, when used on a lower version of vs2008 and so on, while it is possible to compile the past, there is often a lack of run-time libraries at run time. This is the time to install Microsoft Visual C + + 2015 RC Redistributable (x86 or x64) and download it yourself online. However, there are sometimes installation failures, which should be the system's missing patch packs. So I downloaded the libuv-v1.8.0.tar.gz with vs2008 to compile.

2. After decompression, open the Vcbuild.bat file, delete to only the remaining vs2008, if the other version of VS, according to their own needs to delete.


3. Run the Vcbuild.bat file in the cmd window. The VS2008 project file appears, with vs2008 open compilation.

4. LIBUV link Error when using: Just like this (generally more than that)

Libuv.lib (util.obj): Error LNK2001: unresolved external symbols __imp__getuserprofiledirectoryw@12

Wait, this is because the LIBUV runtime must not be added to the program, just add the following in the appropriate. cpp file:

#pragma comment (lib, "Ws2_32.lib")
#pragma comment (lib, "Libuv.lib")
#pragma comment (lib, "IPHLPAPI.lib")
#pragma comment (lib, "Psapi.lib")
#pragma comment (lib, "Userenv.lib")

Note: If not, you may need to add another library file.




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.