GNU or MS? This link is not a link!

Source: Internet
Author: User

Add the case that triggered big research on environmental variables today...

---------------- Split line -------------------

 

The following is an example of how to manually tune Hou Jie in MFC.

A strange error occurs during the make process:

 

Link: invalid option -- s
Try 'link -- help' for more information.

 

I have read several lines related to GENERIC. MAK in the following example:

 

Generic.exe: generic. obj generic. res
Link/MACHINE: I386-subsystem: windows generic. res generic. obj/
Libc. Lib kernel32.lib user32.lib gdi32.lib

I suspect it is a problem with parameters such as/machine-subsystem.

I checked the Internet and found out many details, such:

Project Settings-> Link parameter Settings

Quick query: Linker Reference-msdn

Quick query: Description of parameters in VC ++ Project Setting

 

According to the information, I found that the link parameter here is so strange.

The document is clearly/SUBSYSTEM

-Subsystem

 

Wondering, try changing-subsystem to/SUBSYSTEM and try again

The result is incorrect:

 

Kernel32.lib user32.lib gdi32.lib
Link: Extra operand 'generic. Res'
Try 'link -- help' for more information.

This is completely dumbfounded.

Dizzy for a minute, okay, then follow the prompts to see what to say in the help.

 

Immediately decompress the help package.

 

Usage: link file1 file2
Or: link Option
Call the link function to create a link named file2 to an existing file1.

-- Help display this help and exit
-- Version output version information and exit

Report Bugs to <bug-coreutils@gnu.org>.

 

I am using GNU linker for a long time.

 

I searched for the system's environment variables and found that it was originally a ghost:

 

% SystemRoot %/system32; % SystemRoot %/system32/Wbem; C:/cygwin/bin; % MSSdk %/Bin/WinNT; f:/Microsoft Visual Studio/Common/MSDev98

 

Move the red part to the end to solve the problem.

 

 

Environment variables. Be careful later !!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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.