Home > Back-end >  With CL. Exe compile a simple program
With CL. Exe compile a simple program

Time:09-28

1. The recent heavy vs2012 pro
2. My cl directory "E: \ \ Microsoft Visual Studio 11.0 VC \ bin"

Test. The CPP as a hello world application

Compile this warning:
F: \ gts> Cl test. CPP
Microsoft (R) C/C + + Optimizing Compiler Version 17.00.50727.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.

Cl: Command line warning D9024: unrecognized source file type 'E: \ Microsoft, object file assumed
Cl: Command line warning D9024: unrecognized source file type 'Visual', the object file assumed
Cl: Command line warning D9024: unrecognized source file type 'Studio, the object file assumed
Cl: Command line warning D9024: unrecognized source file type 'VC 11.0 \ \ bin, the object file assumed
Test. The CPP
Microsoft (R) Incremental would Version 11.00.50727.1
Copyright (C) Microsoft Corporation. All rights reserved.

When then links to such mistakes:
In/out: Microsoft. Exe
E: \ Microsoft
Visual
Studio
VC 11.0 \ \ bin
Test the. Obj
LINK: fatal error LNK1181: always open input file 'E: \ Microsoft. Obj'


[lead to I can generate test. Obj files, but couldn't link, feel the compiler and the connector put his own path as a parameter, but also because of space separated into several parameters of the path!]
Another: in VS green arrow (point) I compile properly link program,

Again another: because of an open source project, the author improved the cmake file) I need native compilation, so you must use the cl, can't use VS,

CodePudding user response:

Add cmake project, because can't pass a test example compilation, so the whole generation process is interrupted, it should be caused by the problem above,
  • Related