In that year, I learned the Link Library for Linux C-Windows step by step ~~~

Source: Internet
Author: User

After the mini 64 10 migration, I plan to share my Linux C notes with you. If you have any support, I hope you can point it out. Thank you !!

Reprinted please indicate the source: http://blog.csdn.net/muge0913/article/details/7308204


Direct Write process ~~~~~


Visual c ++ 6.0 creates a static library. The source file code is very simple,

 #include "foo.h" int add(int a, int b){return a + b;} 


Header file code:

#ifndef _FOO_H#define _FOO_H int add(int a, int b);#endif 

If you want to create a static library on Windows, perform the following operations,

Step by step ~~~


(1) Open the Visual C ++ 6.0 tool and click File> New> projects]

(2) select [Win32 static library], write the project name in [project name], and select the Project SAVE address in [location ].

(3) Click OK, continue to finish, and then click OK to create a static library project.

(4) click File> New> files and select C ++ source files ],

(5) Select Add to pProject, add the source file to the project you just created, and enter the file name +. c Suffix in file.

(6) Repeat operations 4 and 5 and add a file name +. h header file.

(7) enter the above Code in the header file and source file respectively, and click the F7 button to generate *. Lib in the DEBUG directory.


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.