C code kompilieren windows


















Pelles C seems to be based off lcc and has a somewhat nicer IDE, though I haven't used it personally. Most universities give you access to Microsoft Dreamspark. Windows is a terrible platform for C development.

I would agree with the people who suggest using gcc via cygwin. GCC works fine. If you are more comfortable with commandline solutions in general and gcc in particular, MinGW or Cygwin might be more up you alley. They are also both free. Any of these tools will be more than adequate for learning. If the labs and the assignments are in linux, then you probably want a MinGW solution. If they're in windows, get Visual Studio Express.

Can't you get a free version of Visual Studio Student Addition from your school? Most Universities have programs to give free software to students. All of which are free and work well. Each compiler has it's own quirks and deifferences, you need to try out a few and find the one with which you are most comfortable. I like Proggy Programming fonts! Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow.

Learn more. C compiler for Windows? Asked 13 years, 3 months ago. Active 2 years, 8 months ago. Viewed k times. Improve this question. Community Bot 1 1 1 silver badge. Check out the Windows Subsystem for Linux introduced in This lets you run native linux tools like gcc right on Windows. See: docs. Add a comment.

Active Oldest Votes. Improve this answer. BaseZen 8, 2 2 gold badges 33 33 silver badges 47 47 bronze badges. Ben Hoffstein Ben Hoffstein By using MinGW crash the executables. Is there any better solution? While mingw is a fantastic project, it didn't suit me when I wanted to compile Windows exec. Alex M Alex M 2, 20 20 silver badges 15 15 bronze badges. Privacy policy. This walkthrough shows how to create a basic, "Hello, World"-style C program by using a text editor, and then compile it on the command line.

Visual Studio is a powerful integrated development environment that supports a full-featured editor, resource managers, debuggers, and compilers for many languages and platforms. For information on these features and how to download and install Visual Studio, including the free Visual Studio Community edition, see Install Visual Studio.

It's perfect for build labs or classroom exercises and installs relatively quickly. To install only the command-line toolset, download Build Tools for Visual Studio from the Visual Studio downloads page and run the installer. You need a developer command prompt window, which is a regular command prompt window that has all the required environment variables set. Your first walkthrough task is to find the right shortcut to use.

A developer command prompt shortcut automatically sets the correct paths for the compiler and tools, and for any required headers and libraries. Some of these values are different for each build configuration. You must set these environment values yourself if you don't use one of the shortcuts. Because the build environment is complex, we strongly recommend you use a developer command prompt shortcut instead of building your own.

These instructions vary depending on which version of Visual Studio you are using. To see the documentation for your preferred version of Visual Studio, use the Version selector control. It's found at the top of the table of contents on this page.

If you've installed Visual Studio on Windows 10 or later, open the Start menu, and choose All apps. Then, scroll down and open the Visual Studio folder not the Visual Studio app. If you're using a different version of Windows, look in your Start menu or Start page for a Visual Studio tools folder that contains a developer command prompt shortcut. You can also use the Windows search function to search for "developer command prompt" and choose one that matches your installed version of Visual Studio.

Use the shortcut to open the command prompt window. In the command prompt window, enter cl and verify that the output looks something like this:. You must fix this issue before you can continue. Right-click each package and click Mark for Installation.

The Basic Setup has about 7 packages listed in the box at the top. Right-click each one of them or just the ones you want and click Mark for Installation.

This adds an icon with an arrow next to each one and marks it for installation. Install the selected packages. It may take your computer several minutes to install all packages. Use the following steps to install the packages that are marked for installation. Click the Installation menu in the upper-left corner. Click Apply Changes. Click Apply. Click Close once the installation is done. Add the path to MinGW to system environment variables. Use the following steps to add the path to MinGW to system environtment variables: Type environment in the search bar next to the Start menu.

Click Edit the system environment variables in the search results. Click Environment Variables Select the Path variable. Click OK , and then OK again. Click the one remaining OK button to close the window. Open the command prompt as an administrator. You must be signed in to a Windows account with administrative privileges to open the Command Prompt as an administrator. Use the following steps to open the Command Prompt as an administrator: Type cmd in the search bar next to the Start menu..

Click Yes to allow changes. Navigate to the folder where your source code is saved. For example, if your source code file called helloworld. Type the name of your program to run it. If that doesn't work, try temporarily disabling your virus software. What do I do if there are two tables in the environmental variables window?

In which table and directory should I add an environmental variable? Use the upper table entitled "User Variables for" and select the "Path" directory. Not Helpful 1 Helpful 4. Not Helpful 6 Helpful 6. Theoretically, as long as a file contains the necessary binary machine code, it could be run by a processor. One example is how on Windows, a screensaver is simply a program just like a.

However, as far as I know, most modern operating systems will not attempt to execute a file if it does not identify the file type as being executable, so you would need to somehow trick the operating system into actually starting a new process using the code from the file. Not Helpful 2 Helpful 4. This means that it was not properly installed on your computer. Try restarting the process.

Not Helpful 19 Helpful 2. What should I do if the command prompt keeps telling me that "GCC" is not an internal or external command or batch file?

Likely either some part of the installation went wrong or you didn't connect it to your PATH. See step 8 for connecting it to your PATH and if that doesn't work, try to re-install. Not Helpful 1 Helpful 0. You just open a text editor and write your code and then follow the instructions above to compile.



0コメント

  • 1000 / 1000