Add lib files and some common project settings in vs2008

Source: Internet
Author: User

The following uses adding the ws2_32.lib file as an example.

Method 1 (add Code directly ):

Directly in the. cpp file, add# Pragma comment (Lib, "ws2_32.lib. (Ws2_32.lib is the Lib file you want to add)

 

Method 2 (added in the vs toolbar ):

1. Project(Project)-> tcpsrv attributes(Tcpsrv properties) (where tcpsrv is the project name)

 

 

2. After the tcpsrv property page is opened, configure properties-> linker(Linker)-> Input(Input ).(Additional dependences), Enter ws2_32.lib.

 

PS: The English section in parentheses is vs2008

 

 

 

 

[Configuration properties]

General-> [output directory].../output/debug indicates the output path of the generated file

General-> [intermediate Directory]. wsiucsparser ___ win32_debug indicates the generated intermediate path.

Debugging-> [command].../../output/debug/tmplatformconsole.exe this project is dll. tmplatformconsole.exe calls this DLL and can add breakpoints in the DLL.

Debugging-> [working directory].../output/debug, set the working path

[C/C ++]

General-> [additonal include directories]./include/epan,./include/glib,./include,./include/decode indicates the path of the file on which the project depends

Precompiled headers-> [precompiled header file]. wsiucsparser ___ win32_debug/wsiucsparser. PCH

Precompiled header file

Output files-> [ASM list name]. wsiucsparser ___ win32_debug/

Output files-> [object file name]. wsiucsparser ___ win32_debug/

Output files-> [program database file name]. wsiucsparser ___ win32_debug/

[Linker]

General-> [output file].../../output/debug/wsiucsparser. dll, define the output file path and name

General-> [additional library directories]./lib depends on the Lib path

Input-> additional dependencies the Lib file on which the glib-2.0.lib gmodule. Lib depends

Input-> [module definition file]./ws_iucs.def, defines the file of the function to be exported. If you want to export the function, this must be defined.

Definition Format:

Library wsiucsparser
Description "wsiucsparser DLL"
Exports
Initwsparseriucs @ 1
Deinitwsparseriucs @ 2
Wsiucsparse @ 3

Debugging-> [generate program database file].../output/debug/wsiucsparser. PDB

Advanced-> [import library].../../output/debug/wsiucsparser. Lib

 

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.