Build Poco Library under Windows

Source: Internet
Author: User

Download Poco Library: https://pocoproject.org

I chose the full version, because I need SSL



Download yourself to the type library you want (dynamic or static, which version, debug or release)

Compile script in Build_vs120.cmd, see yourself version choose that way to compile, I choose 120, I compile for static_mt,release version library, modify own script file, parameter choose in Buildwin.cmd script








After the script is modified, open the command line tool in VS, I select Developer Command Prompt (see what version you compile), switch to script file directory input Buildwin 120 compile


Wait for compilation to succeed, if there are components to remember to put the components together to compile, otherwise, you will not open the components of the error, etc., if you do not need the component and chose the full version can not care about him, because this is the compilation of components of the library is not successful, other basic library success on it, after the success of the Lib and bin directory

Note: Each library will have two identical library files, one more d, the following figure, this is more d is debug compile-time use, no D release compiled using






Whether the test environment compiles successfully: the head file (Engineering attribute--c/c++--General-Additional include directory) and the path of the library (engineering properties-linker-General-Additional library directory) load well, load the library in the bin code needed into the debug (current engineering at the same level Ddebug) directory

I need to be PocoFoundationd.dll, because I'm the debug version, so I chose DLL for D.




The test code is as follows:

#include <Poco/DateTime.h>
#include <Poco/DateTimeFormat.h>
#include <iostream>

Using Poco::D atetime;
Using Poco::D atetimeformat;
int main (int argc, char** argv)
{
	DateTime now;
	Std::cout << "Today is"
		<< Datetimeformat::weekday_names[now.dayofweek ()] << ","
		<<  Datetimeformat::month_names[now.month ()-1] << "
		<< now.day () <<"-"
		<<" Day number "
		<< now.dayofyear ()
		<<" in "
		<< now.year ()
		<<" and day number "
		< < (long) Now.julianday ()
		<< "in the Julian calendar." << Std::endl;
	System ("pause");
	return 0;
}


Run successfully:




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.