Helo with visual studio 2015 - c

could someone help with how can I create a new project on a mac, like in windows when I'm opening win32 console app to start writing C programing?

You can use emacs or xcode on the OSX
with emacs create a project in c and use gcc

You can't do C development using Visual Studio for Mac. The product is the Xamarin toolset used for .Net cross-platform development only.
Users have requested that C and C++ is added (vote here), so it is possible that it could be added in the future.
Meanwhile, see How to use/install gcc on Mac OS X 10.8 / Xcode 4.4

Related

How to compile and run C on a Surface Pro X?

I'd like to program some Ansi-C on a Surface Pro X. On my Computer I just set up VS Code as an editor and installed Msys2 which comes with the GCC. But the same won't work on the Surface Pro X, cause if the processor architecture as I understand (correct me if I'm wrong).
So my question is: How can I compile and run C on a Surface Pro X and also check for Ansi C conformity. It also would be nice to be able to work in VS Code.
Also is this a general problem of the Surface Pro X? Would those issues also appear when trying to program java or python?
I don't have a Surface Pro X or any other ARM Windows device, however it should be possible to use VS Code since there has been a Windows on ARM version since May 2020 (download on the usual Visual Studio Code download page).
I am not sure on what development environments are available for Windows on ARM, but you could always install WSL (the Windows subsystem for Linux) where you can then install pretty much anything you want. You can then link your VS Code to your WSL and work there.
To install development tools for any language you would then follow instructions on how to install that environment for Linux (eg. using apt-get for Debian and it's derivatives like Ubuntu).
To install basic development tools for Java and C/C++ in WSL type sudo apt install default-jdk default-jre gcc g++, python is generally already installed in a linux environment.

How to install working MinGW in my 32-bit Windows 10

I'm a complete newbie to programming and I want to start learning C. I downloaded Visual studio code and MinGW, then tried to execute a simple 'hello world'. However, I get this error:
This version of C:\MinGW\bin\gcc.exe is not compatible with the version of Windows you're running.
After some searching, I think I have figured out that it is because I'm using Windows 10 32-bit. I can't find helpful videos or tutorials. What should I do?
Try with MinGW-w64 (e.g. from https://winlibs.com/) instead of old MinGW, and make sure VSCode is properly configured for it (see: https://code.visualstudio.com/docs/cpp/config-mingw).

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

Compile C code in Visual Studio in Windows for Linux

I'm using Visual Studio in Windows to develop basic C applications. I want to compile my code for Linux, without the need to have Linux installed on my machine. Is that possible ? And how ?
You'll need to have Linux installed somewhere. If you can remote to a linux box, vm, or WSL console, from your Visual Studio machine, you can use VS 2019 to build and debug most applications in any of those environments, via the Cross Platform Connection Manager.
The following blog and document links are a good place to start.
Targeting the Windows Subsystem for Linux from Visual Studio
C++ with Visual Studio 2019 and Windows Subsystem for Linux (WSL)
EA and Visual Studio’s Linux Support
Usability Improvements for CMake in Visual Studio 2019 version 16.4: Launch Target Selection and Overview Pages
Similarly, Visual Studio Code has some support for this as well:
Using C++ and WSL in VS Code
Sincerely,
yes, it is possible.
Have a look at this stackoverflow question.
Install WLS on your Windows machine
Use the standard gcc instruction (or, better, Makefiles and/or CMake)
Example:
Let's say you have your program:
//code within filename.c
#include <stdio.h>
int main(){
printf("Hello Youssef\n");
return 0;
}
Then, within the folder, run:
$ gcc filename.c
and then run it:
$ ./a.out
Hello Youssef
You can install a VM (virtual machine) on your windows computer, then install linux on the virtual machine.
Note: both the VM and linux are free downloads

Build C executable for Raspberry Pi on Windows or Linux

I have to design a C executable (no GUI) that is supposed to run on Raspberry PI. I'm familiar with design using IDE like Visual Studio or Eclipse (with CDT plugin). If i use Raspberry PI as a design machine, I think I have no chance to use a standard IDE. I should use makefiles and gcc compiler only.
Is there any chance to develop Raspberry PI executable using Visual Studio (for Windows) or Eclipse (for both Windows and Linux).
You can specify to eclipse projects with Makefiles. You can also specify a compilation toolchain.
So yes, you can develop and compile for Raspberry Pi or for other plateforms using Eclipse.
For getting toolchain and other tools for Rasp Pi you can find things here.
In Eclipse, you create a new or import a project choosing Makefile Project with Existing Code then add your toolchain.
If you have a newer Pi like the 4, you should be able to run eclipse directly from the Pi desktop. You can download via:
sudo apt-get install eclipse
This will be a stripped-down version and will likely run quite slow, so I agree compiling on a more powerful remote machine is better...
Is there any chance to develop Raspberry PI executable using Visual Studio (for Windows) or Eclipse (for both Windows and Linux).
Yes, this is called cross-compiling. You can set up a cross-compile toolchain for the raspberry pi on windows or linux and configure your Eclipse CDT project to build with the toolchain. You can even set up remote debugging.
This website has good information and a step-by-step guide for windows using cygwin.
This looks like a good guide for linux.
Edit:
Just realized you asked for Visual Studio on Windows. I don't think there is Visual Studio support for this. The example I pointed to sets up cygwin so you have an emulated linux environment. You could also set up a VM using free VM software and install a linux environment that way, and run eclipse CDT from there. This is what I did when setting up a cross compiling environment for the Raspi.

Resources