Instalar Dev C En Ubuntu

-->

Orwell Dev-C. A free, portable, fast and simple C/C IDE Windows Terminal. The New Windows Terminal Code::Blocks. A free C, C and Fortran IDE About Site Status @sfnetops. Create a Project Open Source Software Business Software Top Downloaded Projects. Blog @sourceforge. Do site: Dev-C is an full-featured Integrated Development Environment (IDE) for 'Win32'. Pra linux vc pode usar o g 'Gnu C Compiler' para compilar seus programas. Existem varias IDEs pra linux como o Anjuta ou Eclipse (com plug-in C), mas vc pode fazer o seu programa em qq editor de texto e compilar na linha de comando. Done Package xlibs-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package xlibs-dev has no installation candidate.

APPLIES TO: SQL Server (Linux only) Azure SQL Database Azure Synapse Analytics (SQL DW) Parallel Data Warehouse

In this quickstart, you install SQL Server 2017 on Ubuntu 18.04. You then connect with sqlcmd to create your first database and run queries.

In this quickstart, you install SQL Server 2019 on Ubuntu 18.04. You then connect with sqlcmd to create your first database and run queries.

Usb

Tip

This tutorial requires user input and an internet connection. If you are interested in the unattended or offline installation procedures, see Installation guidance for SQL Server on Linux.

Prerequisites

You must have an Ubuntu 16.04 or 18.04 machine with at least 2 GB of memory.

To install Ubuntu 18.04 on your own machine, go to http://releases.ubuntu.com/bionic/. You can also create Ubuntu virtual machines in Azure. See Create and Manage Linux VMs with the Azure CLI.

Note

At this time, the Windows Subsystem for Linux for Windows 10 is not supported as an installation target.

For other system requirements, see System requirements for SQL Server on Linux.

Note

Ubuntu 18.04 is supported starting with SQL Server 2017 CU20. If you want to use the instructions on this article with Ubuntu 18.04, make sure you use the correct repository path, 18.04 instead of 16.04.

If you are running SQL Server on a lower version, the configuration is possible with modifications.

You must have an Ubuntu 16.04 or 18.04 machine with at least 2 GB of memory.

To install Ubuntu 18.04 on your own machine, go to http://releases.ubuntu.com/bionic/. You can also create Ubuntu virtual machines in Azure. See Create and Manage Linux VMs with the Azure CLI.

Note

At this time, the Windows Subsystem for Linux for Windows 10 is not supported as an installation target.

For other system requirements, see System requirements for SQL Server on Linux.

Install SQL Server

Note

The following commands for SQL Server 2017 points to the Ubuntu 18.04 repository. If you are using Ubuntu 16.04, change the path below to /ubuntu/16.04/ instead of /ubuntu/18.04/.

To configure SQL Server on Ubuntu, run the following commands in a terminal to install the mssql-server package.

  1. Import the public repository GPG keys:

  2. Register the Microsoft SQL Server Ubuntu repository:

    Tip

    If you want to install SQL Server 2019 , you must instead register the SQL Server 2019 repository. Use the following command for SQL Server 2019 installations:

  3. Run the following commands to install SQL Server:

  4. After the package installation finishes, run mssql-conf setup and follow the prompts to set the SA password and choose your edition.

    Tip

    The following SQL Server 2017 editions are freely licensed: Evaluation, Developer, and Express.

    Note

    Make sure to specify a strong password for the SA account (Minimum length 8 characters, including uppercase and lowercase letters, base 10 digits and/or non-alphanumeric symbols).

  5. Once the configuration is done, verify that the service is running:

  6. If you plan to connect remotely, you might also need to open the SQL Server TCP port (default 1433) on your firewall.

At this point, SQL Server is running on your Ubuntu machine and is ready to use!

Install SQL Server

Note

The following commands for SQL Server 2019 points to the Ubuntu 18.04 repository. If you are using Ubuntu 16.04, change the path below to /ubuntu/16.04/ instead of /ubuntu/18.04/.

To configure SQL Server on Ubuntu, run the following commands in a terminal to install the mssql-server package.

  1. Import the public repository GPG keys:

  2. Register the Microsoft SQL Server Ubuntu repository for SQL Server 2019:

  3. Run the following commands to install SQL Server:

  4. After the package installation finishes, run mssql-conf setup and follow the prompts to set the SA password and choose your edition.

    Note

    Make sure to specify a strong password for the SA account (Minimum length 8 characters, including uppercase and lowercase letters, base 10 digits and/or non-alphanumeric symbols).

  5. Once the configuration is done, verify that the service is running:

  6. If you plan to connect remotely, you might also need to open the SQL Server TCP port (default 1433) on your firewall.

At this point, SQL Server 2019 is running on your Ubuntu machine and is ready to use!

Install the SQL Server command-line tools

To create a database, you need to connect with a tool that can run Transact-SQL statements on the SQL Server. The following steps install the SQL Server command-line tools: sqlcmd and bcp.

Use the following steps to install the mssql-tools on Ubuntu.

  1. Import the public repository GPG keys.

  2. Register the Microsoft Ubuntu repository.

  3. Update the sources list and run the installation command with the unixODBC developer package. For more information, see Install the Microsoft ODBC driver for SQL Server (Linux).

    Note

    To update to the latest version of mssql-tools run the following commands:

  4. Optional: Add /opt/mssql-tools/bin/ to your PATH environment variable in a bash shell.

    To make sqlcmd/bcp accessible from the bash shell for login sessions, modify your PATH in the ~/.bash_profile file with the following command:

    To make sqlcmd/bcp accessible from the bash shell for interactive/non-login sessions, modify the PATH in the ~/.bashrc file with the following command:

Connect locally

The following steps use sqlcmd to locally connect to your new SQL Server instance.

  1. Run sqlcmd with parameters for your SQL Server name (-S), the user name (-U), and the password (-P). In this tutorial, you are connecting locally, so the server name is localhost. The user name is SA and the password is the one you provided for the SA account during setup.

    Tip

    You can omit the password on the command line to be prompted to enter it.

    Tip

    If you later decide to connect remotely, specify the machine name or IP address for the -S parameter, and make sure port 1433 is open on your firewall.

  2. If successful, you should get to a sqlcmd command prompt: 1>.

  3. If you get a connection failure, first attempt to diagnose the problem from the error message. Then review the connection troubleshooting recommendations.

Create and query data

The following sections walk you through using sqlcmd to create a new database, add data, and run a simple query.

Create a new database

The following steps create a new database named TestDB.

  1. From the sqlcmd command prompt, paste the following Transact-SQL command to create a test database:

  2. On the next line, write a query to return the name of all of the databases on your server:

  3. The previous two commands were not executed immediately. You must type GO on a new line to execute the previous commands:

Tip

To learn more about writing Transact-SQL statements and queries, see Tutorial: Writing Transact-SQL Statements.

Insert data

Next create a new table, Inventory, and insert two new rows.

  1. From the sqlcmd command prompt, switch context to the new TestDB database:

  2. Create new table named Inventory:

  3. Insert data into the new table:

  4. Type GO to execute the previous commands:

Select data

Now, run a query to return data from the Inventory table.

  1. From the sqlcmd command prompt, enter a query that returns rows from the Inventory table where the quantity is greater than 152:

  2. Execute the command:

Exit the sqlcmd command prompt

To end your sqlcmd session, type QUIT:

Performance best practices

After installing SQL Server on Linux, review the best practices for configuring Linux and SQL Server to improve performance for production scenarios. For more information, see Performance best practices and configuration guidelines for SQL Server on Linux.

Cross-platform data tools

In addition to sqlcmd, you can use the following cross-platform tools to manage SQL Server:

Azure Data StudioA cross-platform GUI database management utility.
Visual Studio CodeA cross-platform GUI code editor that run Transact-SQL statements with the mssql extension.
PowerShell CoreA cross-platform automation and configuration tool based on cmdlets.
mssql-cliA cross-platform command-line interface for running Transact-SQL commands.

Connecting from Windows

SQL Server tools on Windows connect to SQL Server instances on Linux in the same way they would connect to any remote SQL Server instance.

If you have a Windows machine that can connect to your Linux machine, try the same steps in this topic from a Windows command-prompt running sqlcmd. Just verify that you use the target Linux machine name or IP address rather than localhost, and make sure that TCP port 1433 is open. If you have any problems connecting from Windows, see connection troubleshooting recommendations.

For other tools that run on Windows but connect to SQL Server on Linux, see:

Other deployment scenarios

For other installation scenarios, see the following resources:

UpgradeLearn how to upgrade an existing installation of SQL Server on Linux
UninstallUninstall SQL Server on Linux
Unattended installLearn how to script the installation without prompts
Offline installLearn how to manually download the packages for offline installation

Tip

For answers to frequently asked questions, see the SQL Server on Linux FAQ.

Next steps

How to Install Dev-C++ and the GLUT Libraries
for Compiling OpenGL Programs with ANSI C

(version of July 16, 2009)

These notes explain how to compile programs written in ANSI C with OpenGL and GLUT using the Dev-C++ compiler.

Bloodshed Dev-C++ is a free C++ compiler and development environment for Windows operating systems. Like most C++ compilers, it also can be used to compile ANSI C. By installing the GLUT header and library files, it can be used to write programs that use OpenGL. This is needed to run programs for Edward Angel's textbook, Interactive Computer Graphics 5th edition and possibly other computer graphics texts.

These notes do not explain how to compile OpenGL with C++ . The 6th edition of Angel's book uses C++ which will not work with these notes.

These instructions have been tested on a small variety of Windows 2000 and Windows XP systems. These systems come with the files needed for OpenGL, but not the files needed for GLUT.

Dev-C++ does not work well with Microsoft's Vista. The problem, and a possible fix, is discussed here: http://aresio.blogspot.com/2007/06/vista-and-dev-cpp.html but I have not tested this information.

I. Download Dev-C++ from http://www.bloodshed.net/dev/devcpp.html and install it.

Details:

Get Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC 3.4.2 Although this is a 'beta' version, it works perfectly fine. Click on SourceForge to go to a list of download sites and pick one. The file will be something like devcpp4.9.9.2_setup.exe. Save this file in a place like C:Temp.

When the download is complete, click on the 'open' button to start the installation process. (Or go to C:Temp andDouble click on devcpp4.9.9.2_setup.exe). You will see a few screens that ask you to pick a language (English) and to agree to the license terms. Choose a 'typical' installation.

Accept the suggested destination for the installation:

Many subdirectories and files are extracted to the destintion:

Answer 'yes' when it asks if you wish to install Dev-cpp for all users. Note: if the installation fails, re-install and try 'no' for this.

A screen says the installation is complete:

Keep the check mark in the box. Click on 'Finish'. A first-time configuration screen appears:

Pick 'English' and 'New Look'. In the next several screens, hit 'Yes' for its suggestions.

Eventually you are done. Click 'OK'.

II. DEV-C++ starts up. Try out the installation with a simple C program.

Details:

The program starts up automatically.

Click File/New/Project. Pick a name for the project (such as 'myProject'). Click 'C Project'. Click on 'Empty Project'. Click 'OK'.

In 'Create New Project', click 'save' (later on you will probably want to create separate subdirectories for your various projects.).

Click 'File/New/Source File' and in 'Add source file to current project' click 'Yes'. You now get a screen where you can edit the source file.

Type in a simple C program, as below. Now click 'File/Save As' and save the file as 'hello.c' (or other name.) Important: be sure that the file extension is .c. With any other extension (such as the suggested .cpp) you will have problems compiling.

Now click 'Execute/Compile and Run'

The program will (hopefully) compile, run, and write its output to a DOS window. If you have the system('pause') statement in your program, the output will stay in the window until you hit a key. Another way to run the program (after it has been compiled) is to start a DOS window outside of the Dev-Cpp system, then navigate to the subdirectory that holds your project, and type hello.exe.

At this point, the compiler and development environment has been installed. You should find Dev-C++ listed under 'Programs' on the 'Start' menu and will now be able to write, compile, and run C (and C++) programs. You will have include files, libraries, and dll's for OpenGL (and all other standard packages) but not GLUT. GLUT manages the windows and other user interface components needed for OpenGL programming, and needs to be separately installed.

If you do not need GLUT , you can quit now.

Instalar Dev C En Ubuntu Download

III. Download and install GLUT

To run OpenGL with GLUT (which is what the programs in Angel's book use), you need to get three files and place each file in its proper directory. All the files you need (and more) are contained in one zip file.

Details:

Download GLUT files from http://chortle.ccsu.edu/Bloodshed/glutming.zip Download the file glutming.zip Save the zip file in some convenient location (perhaps C:temp).

Double click on glutming.zip (or otherwise unzip it). You will see the files that are in the zip archive. (Your un-zipping program will probably be diferent than the one shown here, but should work about the same.)

Click on 'Extract' to extract all the subdirectories and files. Pick some convenient directory to extract them to (perhaps C:tempglutming). You only need three files, but extract all of them anyway.

Only three of the files in the various subdirectories are needed. Each of the three files should be put in a subdirectory with other files of its type. Use Explorer to move the files to where they are needed.

Note: If you only see some of these files listed in Explorer, click on 'View/Options/View' and then select the radio button 'Show all Files'.

glut.h -- copy this file to C:Dev-CppincludeGL

Copy from your 'unzipped' subdirectories (wherever they are):

To here:

libglut32.a -- copy this file from your unzipped directories to C:Dev-Cpplib

There may be a newer version of this file there, already. Replace that version with the one you unzipped (if you keep the newer version your programs will not link correctly.)

Copy from your 'unzipped' subdirectories:

To here:

glut32.dll -- move this file to C:WINNTSystem32, or similar location.

The location for this file depends on your operating system. The directory where it goes is the directory that holds the dynamic load libraries (*.dll). An easy way to find where it should go is to look for glu32.dll (use 'Search' from the start menu).

The directory to use should also have the files glu32.dll and opengl32.dll. These should have come with your operating system.

IV. Test Dev-cpp with GLUT

The essential step in compiling and running a C program that contains OpenGL and GLUT functions is to tell the linker where the libraries are. This is done by clicking Project/Project Options/Parameters/Add Library or Options and then navigating to the libraries you need to include: libopengl32.a, libglu32.a, and libglut32.a. The libraries should be added in that order.

Details:

a. Create a subdirectory for a project. Do this first, before you start Dev-Cpp. Create a new subdirectory with 'Explorer' by clicking 'File/New/Folder'.

Instalar Ubuntu En Windows 10

For example, create a folder C:GLproject.

b. Start Dev-cpp:

c. Start a new project by clicking File/New/Project. In the panel that pops up, name the project something like 'rectangle', click on 'empty project' and 'C': Click OK.

Note: For compiling with OpenGL you must create a project. You need to have a project (not just a single C file) in order to link in the OpenGL libraries.

d. In the next panel, navigate to your folder C:GLproject, and click 'Save'.

e. In Dev-C++, click 'File/New/Source File' and then in the next panel 'Add to Project' click 'yes'. Click 'File/Save As' and then give the file a name. Navigate to your project subdirectory to save the file in it. Name the file something like 'rectangle.c'

Instalar Dev C En Ubuntu Download

Be sure that the file names ends with '.c' anything else will cause big problems.

f. Click and drag your mouse over the following program so that it is highlighted, then click 'Edit/Copy' from the browser's menu bar.

g. Now click in the editing window of Dev-cpp and then click 'Edit/Paste' in its menu bar. The program will appear in the editing window.

h. Click 'File/Save'. The file in your project directory should now contain an OpenGL program.

i. Tell Dev-cpp what libraries need to be linked. Click 'Project/Project Options'.

j. Now click 'Parameters'. Click the 'Add Library or Object' button and navigate to the libraries that should be added, found under C:Dev-cpplib

  • ../lib/libopengl32.a
  • ../lib/libglu32.a
  • ../lib/libglut32.a

Add them in that order (only). Notice that the slashes will appear in Unix style '/' rather than DOS-style '.

When you are done adding the three libaries, you should see:

The exact pattern of '../../..' you see depends on how deep in the directory structure your source file lies.

Click 'OK'.

k. Click 'Execute/Compile and Run'. The program should compile, link, and run:

If things don't work (very common) click on the 'Compile Log' tab for some confusing error messages. If you see something like the following, it means that you made a mistake in adding the libraries to the project:

Try to fix the list of libraries, or perhaps start over from scratch.

You now are finished, or have given up.