Questions tagged [cl]

cl.exe is a tool that controls the Microsoft C and C++ compilers and linker. cl.exe can be run only on operating systems that support Microsoft Visual Studio.

cl.exe is a tool that controls the Microsoft C and C++ compilers and linker. cl.exe can be run only on operating systems that support Microsoft Visual Studio.

301 questions
3
votes
1 answer

How to write makefile(nmake) for visual studio build tool cl.exe

I want to build a c application with visual-studio build tool cl.exe by invoking nmake similar like make in **NIX systems. I have written a makefile. It cannot find include files and object files for linking. I couldn't find much reference how to…
Wafeeq
  • 869
  • 1
  • 16
  • 34
3
votes
0 answers

Compile the wlua.exe

How do I compile the wlua.exe interpreter using cl.exe?I compile the Lua with the following command: cl /MD /O2 /c /DLUA_BUILD_AS_DLL *.c ren lua.obj lua.o ren luac.obj luac.o link /DLL /IMPLIB:lua5.3.lib /OUT:lua5.3.dll *.obj link /OUT:lua.exe…
Nasca
  • 141
  • 2
3
votes
1 answer

Distinguish a 32bit from a 64bit PE object file generated by cl.exe (Visual Studio C++)

Given two PE object files from cl.exe, one 32bit and one 64bit, how can I tell one from the other without resorting to unix utilities, and preferably on the commandline (cmd.exe or powershell)? C:\> "...\VC\bin\cl.exe" -c test.c …
toting
  • 629
  • 3
  • 14
3
votes
1 answer

Disable Code Analysis for a part of code in CPP(VS 2013)

I want to disable Code Analysis for a CPP file. There is a way to exclude header files. https://msdn.microsoft.com/en-us/library/zyhb0b82(v=vs.100).aspx #include #pragma warning( push ) #pragma warning ( disable :…
sreeR
  • 59
  • 6
3
votes
1 answer

How do I force cmake to use cl.exe without full path?

I am building an open source project (kst, v2.0.8) that uses CMake. I am using CMake v2.8.12.2 and MSVC 2008 as a compiler and am generating NMake makefiles to build it on the command line. I can get it to build successfully with this setup. These…
tinman
  • 6,348
  • 1
  • 30
  • 43
3
votes
2 answers

error: command 'cl.exe' failed: No such file or directory Python 3.4

I've been trying to install pyodbc 3.0.7 by running python setup.py install but continue to have problems. Currently I've hit the "error: command 'cl.exe' failed: No such file or directory" wall. I've looked online for longer than I'd like to admit…
Will.Beasley
  • 141
  • 2
  • 2
  • 7
2
votes
1 answer

Does nvcc use cl.exe to compiler both .cpp and .cu files in windows?

I know nvcc only compiles .cu files, and pass .c or .cpp to designated compilers like gcc, g++, clang, clang++, etc... Here's my problem. Thrust headers in .h file in Windows which uses cl.exe complied just fine. But the same codes in Linux with g++…
S.Y. Kim
  • 73
  • 6
2
votes
1 answer

Creating a DLL using MSVC's cl

I am attempting to get an understanding of how building and linking works, since there's a library I want to compile into a DLL. I do not have control over the tool that will be used to compile - It's going to be the msvc tools invoked via command…
user1999728
  • 913
  • 1
  • 8
  • 25
2
votes
2 answers

VS Code opened via VS Developer Command Prompt not recognizing 'cl'

As the title says, VS Code is not recognizing cl compiler although opened via Visual Studio 2022 Developer Command Prompt: VS Code terminal: I have tried using VS Code external terminal with %comspec% /k "C:\Program Files\Microsoft Visual…
Dima Maligin
  • 1,386
  • 2
  • 15
  • 30
2
votes
1 answer

what must I link to avoid linker error on _aligned_alloc (MSVC command-line)?

I'm trying to build a simple DLL on Windows that wraps _aligned_alloc, _aligned_realloc, and _aligned_free, using the cl command-line tools. My source file is a .c file, includes and , and seems to compile OK with: cl /LD…
Joe Strout
  • 2,634
  • 2
  • 28
  • 39
2
votes
3 answers

Suppressing File IO using CL As400 command

I have recently been tasked by my organization with modifying a large program on our AS400 system. Since I have not worked with this part of the system before before, I wanted to run it through the debugger to get a handle on how it works - however…
Edmund Doyle
  • 103
  • 1
  • 8
2
votes
1 answer

VC2019 address sanitizer no symbolic stack trace 64bit

The following simple program #include int main(int argc, char **argv) { char* arr=malloc(10); arr[10]='\0'; return 0; } builds fine with VC2019 16.8.2 in 32 and 64 bit dynamic linking, however I get only in 32bit a stack…
Leo
  • 925
  • 10
  • 24
2
votes
2 answers

kdiff3 downloadable "kdiff3-1.8.5-windows-64-cl.exe" - what is the "-cl"?

I was looking to download kdiff for windows from https://download.kde.org/stable/kdiff3/ and I noticed the latest package is kdiff3-1.8.5-windows-64-cl.exe while the next-latest is kdiff3-1.8.4-windows-64.exe Does the -cl signify anything like a…
2
votes
3 answers

CMake with clang shows undefined symbol, and with cl links correctly

TLDR Im building a static library and linking it to an executable. Im generating makefiles with cmake. When I generate the makefile for cl (The compiler from visual studio) I have no problems, but when I generate the makefile for clang I get an…
Pablochaches
  • 968
  • 10
  • 25
2
votes
1 answer

Using SDL2 libraries with cl.exe compiler

I'm currently trying to compile a C++ file using Visual Studio Code and I tried editing the c_cpp_properties.json file adding the include folders in the includePath variable and the tasks.json file adding arguments but I still can't compile, it…
Alessandro
  • 21
  • 3