Is there a way to use VS 2010 with clang 9.0.0 version on Windows? - c

I have a project that can be compiled with clang 9.0.0 version and VS 2017, Windows.
clang is installed by pre-built binaries(Windows 32bit).
The problem is that the user environment for this project should use VS 2010.
If I compile in an environment with only VS 2010 for the same project, I get the following error:
clang: error: linker command failed due to signal (use -v to see invocation).
I tried using the -v option and could not find a solution direction.
Issues related to VS 2010 and clang were only a few years ago.
At the clang document(https://clang.llvm.org/get_started.html), I found the sentence "Visual Studio 2017 or later."
Since previous versions of clang supported VS 2010, I wonder if the latest version of clang blocked VS 2010 or whether there is an option.(I could not find any VS related options in many of the clang -help options.)
If I can never use VS 2010 with the latest version of clang, I will try to use an older version of clang.(This is a way to avoid, but it's not impossible)

Related

lldb Windows errors with clang 10

I have clang 10.0.0 for Windows installed from here
I also used the community VS installer to install 3 components that I understood were needed for clang 10:
C++ 2019 Redistributable Update
MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.26)
Windows 10 SDK (10.0.18362.0)
clang itself works ok - I can compile, link with -fuse-ld=lld, run some code with concepts, std::span, looks good.
When I run lldb.exe, I get:
..python36.dll was not found..
If I put python36.dll on the path, I then get:
The application was unable to start correctly (0xc000007b)..
I'm learning C++, wanted to start using a debugger but I'm getting stuck here.
Do I need to install the entire Python 3.6 for this to work? (I have 3.8 already installed)
I needed the 64bit version of python36.dll, got it from wikidll

LINK : fatal error LNK1146: no argument specified with option '/MT'

I'm using Visual Studio 2019 and trying to compile a program that was compatible with Windows XP 32-bit.
When I first ran my .exe on my VM it said that it wasn't compatible with Win32.
I've then changed the Platform Toolset to Visual Studio 2017 - Windows XP (v141_xp).
Now it says I'm missing a VCRUNTIME140d.dll, and following instructions that said to change my Runtime Library to /MT I get the error stated in the title.
Any suggestions would be very much appreciated.
VCRUNTIME140d.dll is Visual C++ Redistributable for Visual Studio 2015.You need to download and install. And this is Debug versions of DLL. You must compile in Release mode.

Use CLion2018 or VS2015 to build C project without dependency

I have a c++ application built in Visual studio 2015, It seems c++ apps have need visual c++ 2015 (In my case) to be installed (on targeted windows version). Then i decided to convert my c++ source to c and use CLion 2018 for build this project. It has no error but the output executable has visual c++ 2015 (It says: vcruntime140.dll is missing) dependency again. Here is my questions:
Does C written executable's have any external dependencies ? What are those dependencies ?
Im new to CLion2018, How to build c projects to work without dependency on all windows versions and architectures ?
Is still any way to use VS2015 to create and build c projects ? (Already tried changing compile as: option to /TC and changing extensions to .c. Build was successful but Output has VCRUNTIME140.dll error).
Note1: Both output files (In CLion and VS) are working on windows 7,8.1,10 with visual c++ 2015 installed. And both have "VCRUNTIME140.dll is missing" error on raw windows 7,8.1,10 without visual c++ 2015 installed.
Note2: Don't want to pack those dll's with my file, Or installing vc++ 2015.

Linking libbz2.dll under windows (64-bit)

I'm trying to use BZ2_bzBuffToBuffDecompress() provided by bzlib.h from bzip.org
My OS is windows 8 64-bit.
I'm using Dev-C++ 5.6.2 and MingW64.
I created a new C project, included "bzip2-1.0.6/bzlib.h" and added the linker -lbz2
Then I built libbz2.dll using Visual studio 2013.
The first time, I built it using the Win32 platform option, witch gave me (while compiling my C program)
skipping incompatible .../bzip2-1.0.6/libbz2.dll when searching for
-lbz2
The second time, I built it using the x64 platform option, witch gave me
undefined reference to BZ2_bzBuffToBuffDecompress
Is there any way to solve this?
UPDATE
I tried the libraries from Cygwin64 (libbz2.a, libbz2.dll.a, libbz2-2.dll) but each one gave the first error message.
UPDATE 2
I ended up using MinGW (32-bit) with libbz2-2.dll

Obtaining MinGW installation with GCC 4.1.1

I need to use the GCC compiler version 4.1.1 on Windows, from a MingGW distribution if possible.
I've been looking for a way to install an older version with the mingw-get installer but I don't find any option to select a specific version. Nevertheless, the official Sourceforge repository doesn't seem to contain the files for this version (http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/)
After searching in alternative distributions like Nuwen or TDM-GCC I haven't found a release including GCC 4.1.1.
My question is, is there any place to obtain a MinGW with GCC 4.1.1, or is there another way to obtain this toolchain?
Thanks.

Resources