[Original] VC6 (SP6) + STLPORT4.6.2 Installation Raiders

xiaoxiao2021-03-06  107

[Original] VC6 (SP6) STLPORT4.6.2 Installation Raiders

First of all, I have almost no experience in VC / C , and STL is also just beginning. In order to use STLPORT, it is busy for half a day, but it is just installed. In order to avoid yourself or others, you will bend, and this experience is recorded. Because I am very dish, even if I have finished installation, there are still many unknown situations, so if there is any error, please specify. There are still some questions in the article. I hope that I can answer myself after I am in depth, and I also welcome the netizen to help me.

Step by Step, now:

1. Install VC6, patch SP6 (download address http://msdn.microsoft.com/vstudio/downloads/Updates/sp/vs6/sp6/default.aspx)

2. Recommend a Visual Assist for VC6, this is a good stuff. It makes the editing environment more useful. (There is a download address http://www.vcer.net/download.jsp?id=1042 http://www.vcer.net/upload/2004/04/1042.zip do not know the failure)

3. Download stlport to www.stlport.org. I downloaded stlport4.6.2 (http://www.stlport.org/archive/stlport-4.6.2.tar.gz)

4. Before you use Stlport, you should first look at the performance of the STL library of the VC. For the simplest engineering, compile a cpp #include using namespace std; int main () {vector v; v.push_back (0); return 0;} This program is compiled, put the mouse On the VECTOR and PUSH_BACK, right-click Goto the Definition of ..., in the pop-up window, (note that the STD is lowercase). Select an entered definition file, you can see that the referenced is .... / vc98 / include / vector file. There is also a list, which is a STL implementation that comes with VC6 in this directory. It is said that it is more rotten, I don't have to understand :) But the procedure below is compiled. #include #include using namespace std; int main () {const Int arraysize = 7; int [[arraysize] = {0, 1, 2, 3, 4, 5, 6}; Vector V (IA, IA Arraysize); //v.push_back (0); Deque D (IA, IA Arraysize); return 0;} The reason should be VC6 Deque does not support such a structure. But this program is not compiled under DEV-C with GCC. Ok, save our project, can guess, if the Stlport is successfully installed, it should be smoothly compiled.

5. Unfaze the downloaded Stlport compression package, I assume that decompress the C: / Stlport (next to the subdirectory of C: / Stlport is the directory of STLPORT SRC, DOC, STLPORT)

6. Compile STLPORT (1) Set the environment variable so that the environment variable PATH contains C: / Program files / Microsoft Visual Studio / VC98 / BIN (of course, if you are willing to make this directory name) (2) Open a DOS window (running CMD) (3) Vcvars32.bat: / ***** a. Modify .... / vc98 / bin vcvars32.bat file, Find SET INCLUDE =% MSVCDIR% / ATL / include;% msvcdir% / include;% msvcdir% / mfc / include;% include% set lib =% msvcdir% / lib;% MSVCDIR% / MFC / lib;% lib% Two sentences, plus the path of Stlport, modified as follows: set include = c: / stlport / stlport;% msvcdir% / atl / include;% msvcdir% / include;% msvcdir% / mfc / include;% include% set libe = C: / stlport / lib;% msvcdir% / lib;% msvcdir% / mfc / lib;% lib% (C: / stlport / lib is currently not existing, but do not worry, compile STLPORT) Note: Section (3) -A Steps to modify the content of this file in this file is not necessary, I am writing this on some documents, but I have tried it several times, I don't have the relationship between this document! So don't change it. (This step is logged out!) **** / b. Run in the DOS window .... / vc98 / bin under this file vcvars32.bat (must !!!) (4) in the same DOS window! Enter the c: / stlport / src directory running nmake -f vc6.mak clean all (problem, VC6 can also choose to support Unicode's VC6-Unicode.mak file, but how unicode in the VC, I don't know: () Compile needs After a little time, you can choose to run nmake -f vc6.mak install.

Note: install task is optional, see stlport the INSTALL document: [quote] "install" target works on most platforms On Win32, it does the following: - copies STLport headers in "stlport" subdirectory of your compiler's INCLUDE directory;. - copies STLport .lib files in your compiler's LIB directory; -. copies STLport DLLs to Windows system directory so they can be found at runtime [/ quote] dums (expert on stlport Forum) recommendations generally do not use nmake install, I also strongly It is recommended not to run this NMAKE Install! ! ! If you want VC's STL and STLPORT STL to coexist, then this install task is not to be executed! ! ! (If you still have to run NMAKE INSTALL, and run a vcvars32.bat first) / ** Problem: Have a copy of the installation document to modify C: / Program Files / Microsoft Visual Studio / Common /Msdev98/bin/sysincl.dat, I didn't try, how to modify it? What is the use? ** / 7. Configure VC to enter VC, compile the wrong CPP in front, and find still have the same compilation error. (Even if Vcvars32.bat is modified, add the path to Stlport, it is useless! It seems that this file can not join include and libs. This is what I said why I don't have to modify vcvars32.bat, I don't understand this file when running VC. Role, please correct :)) Click on the VC's Tools-Options-Directories, select Include Files, add C: / Stlport / Stlport, and transfer to the forefront to select Library Files, add C: / stlport / lib, and transfer to the most Front compilation project, huh, you should pass it. Similarly, in order to verify that the STL library we use, put the mouse to the program and push_back, right-click on the definition of ..., in the pop-up window, (notice these definitions) The STL is a capital string). Select an entry definition file, you can see that the reference is c: /stlport/stlport/stl/_vector.h. (If you have any questions, try Build-Clean Clear Covestive) Important Supplements! If you use the iostream library, a link error will appear.

Workaround: Add / MT / GX parameter in Compilation option (Project-Setting ..- C / C , General, Project Options) Add / MT / GX parameter the -mt option file, using libcmt.lib. The -gx option enables synchronous Exception Handling. What's the meaning on Earth? Reed: Now it is only possible to use Stlport, Unicode version of the compilation. In addition, Stlport itself also has more complex configurations to optimize, static links and other configurations. I haven't used that level, but I have a little prompt. If you want to configure it, please see how the comments of Stlport / STL_USER_CONFIG.H and Stlport / STL / _SITE_CONF.H are tell us how to do. If you have any questions and tricks, please contact me Yadan6388@126.com. I am interested in the data structure and STL. 2004.8.20

Good luck :)

转载请注明原文地址:https://www.9cbs.com/read-125046.html

New Post(0)