Integrate stlport with vc6.0

Source: Internet
Author: User

Environment: vc6.0 + SP5, WindowsXP + SP2
Stlport version 4.6.2

Install my Vc in D:/bin/vc6 and decompress the stlport to D:/bin/vc6/vc98. the root directory of stlport is stlport (that is, remove the original version number)

Edit the vcvars32.bat file under D:/bin/vc6/vc98/bin.

Add % msvcdir %/stlport to the include variable
Add % msvcdir %/stlport/lib to the Lib variable

Should be
Set include = % msvcdir %/stlport; % msvcdir %/ATL/include; % msvcdir %/mfc/include; % include %
Set Lib = % msvcdir %/stlport/LIB; % msvcdir %/mfc/LIB; % lib %

Open a console window and run D:/bin/vc6/vc98/bin/vcvars32.bat,

If echo
Setting environment for using Microsoft Visual C ++ tools.
It indicates the operation is successful.

CD to D:/bin/vc6/vc98/stlport/src
Run nmake-F vc6.mak clean all
Compile stlport. If no error is reported, it will succeed.
I used stlport of version 5.0, but it was not compiled successfully here, so I had to use 4.6.2. After all, 5.0 is not the official version.

Open VC, tools-> options-> directories,
Select include files and add D:/bin/vc6/vc98/stlport.
Select lib files and add D:/bin/vc6/vc98/stlport/lib.
And move them all to the beginning,
When you don't want to use stlport STL and use the STL of VC, you can adjust it to the back.

Compile a test program. The STL provided by VC cannot be used, but stlport can

# Include <vector>
# Include <deque>

Using namespace STD;

Int main (){
Const int arraysize = 7;
Int Ia [arraysize] = {0, 1, 2, 3, 4, 5, 6 };
Vector <int> V (IA, Ia + arraysize );
Deque <int> D (IA, Ia + arraysize );
 
Return 0;
}

Reference
Http://blog.csdn.net/li_yadan/archive/2004/08/20/80285.aspx

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.