Link error OPT: nowin98 error in vs210 compiling sevenzip 7-zip Solution

Source: Internet
Author: User

Download 7z922.tar.bz2 at http://sourceforge.net/projects/sevenzip/files/7-zip/Source codeIs the source of 7-zip in windows.Code. Decompress the package and compile it. It uses VC ++ 6.0.

I directly use the nmake-F makefile of vs2010 to compile

Open cmd to go to 7z920 \ CPP \ 7zip \ UI> nmake to start compilation.

CL compilation CPP No problem

In the OBJ phase of the link, the following occurs:

Link-nologo-OPT: nowin98-OPT: ref-OPT: ICF-Out: O \ link: Fatal error lnk1117: syntax errorInOption'OPT: nowin98'Nmake: Fatal error u1077:'"C: \ Program Files \ Microsoft Visual Studio 10.0 \ Vc \ biN \ link. exe"': Return code '0x45d'Stop.

 

Link-OPT: nowin98-nologo-OPT: ref-OPT: ICF- Out : O \ 7z.exe O \ stdafx. obj o \ client7z. obj o \ inttostring. obj o \ newhandler. obj o \ mystring. obj o \ stringconvert. obj o \ stringtoint. obj o \ myvector. obj o \ wildcard. obj o \ DLL. obj o \ filedir. obj o \ FileFind. obj o \ fileio. obj o \ filename. obj o \ propvariant. obj o \ propvariantconversions. obj o \ filestreams. OBJ oleaut32.lib ole32.lib user32.lib advapi32.lib shell32.liblink: Fatal error lnk1117: syntax error in option "OPT: nowin98" nmake: Fatal error u1077:"  "  C: \ devtools \ Microsoft Visual Studio 10.0 \ Vc \ bin \ Li NK. exe "  ": Return code" 0x45d"  Stop. nmake: Fatal error u1077:"  " C: \ devtools \ Microsoft Visual Studio 10.0 \ Vc \ bin \ nm Ake.exe "  ": Return code" 0x2" Stop.

Solution

 
Nmake new_compiler =1My_static_link =1

The nowin98 prompt can be canceled by adding two parameters after nmake. Of course, you can also manually remove the-OPT: nowin98 after link xxxxxx, which is only troublesome, so you can find this method.

Refer:

Http://sourceforge.net/p/sevenzip/discussion/45797/thread/ea126d68#1f08

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.