Return to site

Failed To Execute In Dev C++

broken image


Under Windows NT, every time i launch Dev-C i get the message 'Failed to set data for' The is because you are not in Administrator mode, and Dev-C tries to write to the registry. To get rid of the error message, log on as the Administrator, or uncheck the file association options in Environment options, Misc. 1.问题:安装好Dev C后运行程序出现以下错误 2.解决办法 2.1修改gcc操作系统版本,在软件右上角更改 2.2 360等杀毒软件允许运行exe文件 最后运行成功 参考文章: https:/. 如何解决Dev-C中failed to execute的问题. Flucitne: 谢谢大佬,解决了. IamVeryCool: dev真的太恶了,半年前用dev写的注释,现在打开看全乱码了,mmp自己的东西自己都不能处理好 我吐了. Select 'libpthreadGC2.a' file from installation directory of Dev C It will be in lib directory. For example if your dev C programs are usually saved in C: Dev-Cpp, look for libpthreadGC2.a file in C: Dev-Cpp lib. Press ok; Now test following sample code ready for running. Using Dev-C 5.0 beta 9.2 (4.9.9.2) on Windows Vista. Nothing will compile. I m trying to use Dev-c on windows vista. The program installs very well but when i. To compile and run simple console applications such as those used as examples in these tutorials it is enough with opening the file with Dev-C and hit F11.

This appendix contains information about administering Oracle Database on Linux. It contains the following topics:

C.1 Extended Buffer Cache Support

Oracle Database can allocate and use more than 4 GB of memory for the database buffer cache. This section describes the limitations and requirements of the extended buffer cache feature on Linux x86 systems.

See Also:

Very Large Memory on Linux x86 for more information.

See Also:

Oracle Database Concepts for more information about the extended buffer cache feature

In-Memory File System

To use the extended buffer cache feature, create an in-memory file system on the /dev/shm mount point equal in size or larger than the amount of memory that you intend to use for the database buffer cache. For example, to create an 8 GB file system on the /dev/shm mount point:

  1. Run the following command as the root user:

  2. To ensure that the in-memory file system is mounted when the system restarts, add an entry in the /etc/fstab file similar to the following:

When Oracle Database starts with the extended buffer cache feature enabled, it creates a file in the /dev/shm directory that corresponds to the Oracle buffer cache.

Note:

If an in-memory file system is already mounted on the /dev/shm mount point, then ensure that its size equals or is larger than the amount of memory that is used for the database buffer cache.

USE_INDIRECT_DATA_BUFFERS Initialization Parameter

To enable the extended buffer cache feature, set the USE_INDIRECT_DATA_BUFFERS initialization parameter to TRUE in the parameter file. This enables Oracle Database to specify a larger buffer cache.

Dynamic Cache Parameters

If the extended cache feature is enabled, then you must use the DB_BLOCK_BUFFERS parameter to specify the database cache size.

Do not use the following dynamic cache parameters while the extended buffer cache feature is enabled:

  • DB_CACHE_SIZE

  • DB_2K_CACHE_SIZE

  • DB_4K_CACHE_SIZE

  • DB_8K_CACHE_SIZE

  • DB_16K_CACHE_SIZE

Limitations

The following limitations apply to the extended buffer cache feature:

  • You cannot create or use tablespaces with nondefault block sizes. You can create tablespaces using only the block size specified by the DB_BLOCK_SIZE parameter.

  • You cannot change the size of the buffer cache while the instance is running.

See Also:

Oracle Database SQL Language Reference for more information about the default block size used by the CREATE TABLESPACE command

Note:

The default VLM window size is 512 MB. This memory size is allocated to the address space of the process. To increase or decrease this value, set the VLM_WINDOW_SIZE environment variable to the new size in bytes. For example, to set the VLM_WINDOW_SIZE to 256 MB, run the following command:

The value that you specify for the VLM_WINDOW_SIZE environment variable must be a multiple of 64 KB.

C.2 Using hugetlbfs on SUSE Linux Enterprise Server 10 or Red Hat Enterprise Linux 4

To enable Oracle Database to use large pages (sometimes called huge pages) on SUSE Linux Enterprise Server 10, or Red Hat Enterprise Linux 4, set the value of the vm.nr_hugepages kernel parameter to specify the number of large pages that you want to reserve. You must specify a sufficient number of large pages to hold the entire SGA for the database instance. To determine the required parameter value, divide the SGA size for the instance by the size of a large page, then round up the result to the nearest integer.

To determine the default large page size, run the following command:

For example, if /proc/meminfo lists the large page size as 2 MB, and the total SGA size for the instance is 1.6 GB, then set the value for the vm.nr_hugepages kernel parameter to 820 (1.6 GB / 2 MB = 819.2).

See Also:

Overview of HugePages for more information on tuning SGA with HugePages, configuring HugePages, and HugePages configuration restrictions.

C.3 Increasing SGA Address Space

Depending on the distribution of Linux, apply the instructions in one of the following sections to increase the SGA address space:

SUSE Linux Enterprise Server 10

To increase the SGA address space on SUSE Linux Enterprise Server 10:

  1. Log in as the oracle user.

  2. In the $ORACLE_HOME/rdbms/lib directory, run the following commands:

    Note:

    If Oracle Database does not start after completing this procedure, or if there are run-time memory errors, then increase the hexadecimal number specified in the first command. For example, if the 0x15000000 value prevents Oracle Database from starting, then specify the value 0x20000000. Lowering this value increases the SGA address space, but could decrease the PGA address space.
  3. Run the following command to determine the process ID of the oracle user's shell process:

    The number returned is the process ID.

  4. Run the following command to switch user to root:

  5. Run the following commands to change the mapped base setting for the oracle user's shell process, where pid is the process ID identified in step 3:

  6. Run the exit command to return to the oracle user's shell process, and start Oracle Listener and Oracle Database.

Note:

All Oracle processes must get this modified mapped base value. Starting the listener from the shell that has the modified mapped base enables client connections to connect properly.

Red Hat Enterprise Linux 4 and Red Hat Enterprise Linux 5

To increase the SGA address space on Red Hat Enterprise Linux 4 and Red Hat Enterprise Linux 5:

  1. Log in as the oracle user.

  2. In the $ORACLE_HOME/rdbms/lib directory, run the following commands:

  3. Start Oracle Database.

C.4 Asynchronous Input-Output Support


Note:

On Linux, Automatic Storage Management uses asynchronous Input-Output by default. Asynchronous Input-Output is not supported for database files stored on Network File Systems.

Oracle Database supports kernel asynchronous Input-Output. This feature is disabled by default.

By default, the DISK_ASYNCH_IO initialization parameter in the parameter file is set to TRUE. To enable asynchronous Input-Output on file system files:

  1. Ensure that all Oracle Database files are located on file systems that support asynchronous Input-Output.

  2. Set the FILESYSTEMIO_OPTIONS initialization parameter in the parameter file to ASYNCH.

C.5 Simultaneous Multithreading

If Simultaneous Multithreading is enabled, then the v$osstat view reports 2 additional rows corresponding to the online logical (NUM_LCPUS) and virtual CPUs (NUM_VCPUS).

C.6 Allocating Shared Resources

To use the MEMORY_TARGET or MEMORY_MAX_TARGET feature, the following kernel parameters need to be potentially modified.

  • /dev/shm mount point should be equal in size or larger than the value of SGA_MAX_SIZE, if set, or should be set to be at least MEMORY_TARGET or MEMORY_MAX_TARGET, whichever is larger. For example, with MEMORY_MAX_TARGET=4GB only set, to create a 4GB system on the /dev/shm mount point:

    • Run the following command as the root user:

    • ensure that the in-memory file system is mounted when the system restarts, add an entry in the /etc/fstab file similar to the following:

  • The number of file descriptors for each Oracle instance are increased by 512*PROCESSES. Therefore, the maximum number of file descriptors should be at least this value, plus some more for the operating system requirements. For example, if the cat /proc/sys/fs/file-max command returns 32768 and PROCESSES are 100, you can set it to 6815744 or higher as root, to have 51200 available for Oracle. Use one of the following options to set the value for the file-max descriptor.

    • Run the following command:

      OR

    • Modify the following entry in the /etc/sysctl.conf file and restart the system as root.

  • Per-process number of file descriptors must be at least 512. For example, as root run the following command.

    • On bash and sh:

    • On csh:

    If the preceding command returns 200, then run the following command to set the value for the per processor file descriptors limit, for example to 1000:

    • On bash and sh:

    • On csh:

  • MEMORY_TARGET and MEMORY_MAX_TARGET cannot be used when LOCK_SGA is enabled. MEMORY_TARGET and MEMORY_MAX_TARGET also cannot be used in conjunction with huge pages on Linux.

C.7 Database Migration from 32-Bit Linux to 64-Bit Linux

To migrate an Oracle Database 11g Release 1 (11.1) for 32-bit Linux to an Oracle Database 11g Release 1 (11.1) for 64-bit Linux, you must perform the following steps:

C.7.1 Online Backup of Database With RMAN

Online backup allows you to take a backup of the database without having to shutdown the database. To achieve this, perform the following steps:

  1. Connect to the database instance as SYSDBA:

  2. Run the following commands to ensure that the database is in ARCHIVELOG mode:

  3. Run the following command to start RMAN, which is located under $ORACLE_HOME/bin directory:

  4. To backup the 32-bit database and all the archived redo log files, run the following command:

    Note:

    Archive redo logs are very important to recover the database. Oracle recommends that you back them up along with your database. You can backup the archive redo logs from time to time by issuing the following command:

C.7.2 Migrating 32-Bit Linux Database to 64-Bit Linux Database

This section covers the following topics:

C.7.2.1 Migrating 32-Bit Database to 64-Bit Database With the Same Directory Structure for Data Files

If the control file, data file, redo log files have the same structure on the target computer as in the source computer, then perform the following steps:

  1. Perform an online backup of the database before starting the migration process. Refer to Online Backup of Database With RMAN for more information.

  2. Install Oracle Database 11g Release 1 (11.1) for 64-bit Linux in a new Oracle Database home. It is recommended that you use the same version of Oracle Database home as on the 32-bit computer.

    See Also:

    Oracle Database Installation Guide for Linux
  3. Copy init.ora, data files, control file, and the redo log files from the 32-bit Linux computer to the corresponding locations on the 64-bit Linux computer.

  4. Edit init.ora file to include the following changes:

    • Update the memory requirements included in the file.

    • Edit the control file location if necessary.

    Note:

    Oracle recommends that you double the values of shared pool, java pool, sga_target and large pool listed in the init.ora file.
  5. Connect to the database instance as SYSDBA:

  6. Set the system to spool results to a log file for later verification of success. For example:

  7. Start the 64-bit Oracle Database as follows:

    Note:

    Oracle Database Upgrade Guide for more information on changing from 32-bit to 64-bite
  8. Run the following command on the 64-bit Oracle Database, to invalidate all the PL/SQL modules:

  9. Shut down the 64-bit Oracle Database:

  10. Start the 64-bit Oracle Database:

  11. Revalidate all the existing PL/SQL modules in the format required by the 64-bit Oracle Database:

C.7.2.2 Migrating 32-Bit Database to 64-Bit Database With Different Directory Structure for Data Files

If the control file, data file, redo log files have different structure on the target computer as compared to the source computer, then perform the following steps:

  1. Perform an online backup of the database before starting the migration process. Refer to Online Backup of Database With RMAN for more information.

  2. Install Oracle Database 11g Release 1 (11.1) for 64-bit Linux in a new Oracle Database home. It is recommended that you use the same version of Oracle Database home as on the 32-bit computer.

    See Also:

    Oracle Database Installation Guide for Linux
  3. Edit init.ora file on the 64-bit computer to include the following changes:

    • Update the memory requirements included in the file.

    • The init.ora file still contains the 32-bit control file path. You must manually update control_files parameter value to include the 64-bit control file location.

    Note:

    Oracle recommends that you double the values of shared pool, java pool, sga_target and large pool listed in the init.ora file.
  4. If the 64-bit target computer contains a different structure for data files, then you must re-create the control file or mount database on 64-bit computer. Refer to Re-aligning Data File Path and Name for more information.

    Note:

    Oracle recommends not to use the RESETLOGS option to re-create control files.
  5. Set the system to spool results to a log file for later verification of success. For example:

  6. Run the following command on the 64-bit Oracle Database, to invalidate all the PL/SQL modules:

  7. Turn off the spooling of script results to the log file:

  8. Shut down the 64-bit Oracle Database:

  9. Start the 64-bit Oracle Database:

  10. Revalidate all the existing PL/SQL modules in the format required by the 64-bit Oracle Database:

Re-aligning Data File Path and Name

The following are some of the methods to realign the data file names and path to point to the correct location:

Re-creating Control File

Perform the following steps to re-create the control file:

  1. Run the following command to backup the control file to trace. The trace file is located under the diagnostic_dest directory on the 32-bit Linux computer. The following command generates a trace file which contains the necessary sql to re-create the control file:

    Note:

    Ensure that you open the Oracle Database in the UPGRADE mode after the control file is created.
  2. Rename the trace file generated into .sql format on the 32-bit Linux computer. For example:

    The contents of the control file are as follows, for example:

    • Re-creating control files with NORESETLOGS option.

      32-bit control file with NORESETLOGS option:

      Now, let us consider the modified 64-bit control file:

    • Re-creating control files with RESETLOGS option:

      32-bit control file with RESETLOGS option:

      Now, let us consider the modified 64-bit control file:

  3. Based on the method employed to realign the file paths to point to the correct locations, you must copy the necessary files from the source 32-bit Linux computer to the target 64-bit Linux computer:

    • NORESETLOGS option: Copy init.ora, data files, re-created control files (control.sql), and the redo log files from the 32-bit Linux computer to the corresponding locations on the 64-bit Linux computer

    • RESETLOGS option: Copy init.ora, data files, and re-created control files (control.sql) from the 32-bit Linux computer to the corresponding locations on the 64-bit Linux computer

  4. Connect to the database instance as SYSDBA:

  5. To change from 32-bit to 64-bit, run the following command from the Linux 64-bit Oracle Database home:

Mounting Database on a 64-Bit Computer

Perform the following steps to mount the database on a 64-bit computer:

  1. Copy init.ora, data files, control file and the redo log files from the 32-bit Linux computer to the corresponding locations on the 64-bit Linux computer

  2. Connect to the database instance as SYSDBA:

  3. Start the 64-bit Oracle Database as follows:

  4. Update all the 32-bit data file locations to include the 64-bit data file locations. For example:

  5. Update all the 32-bit log file locations to include the 64-bit log file locations. For example:

  6. To change from 32-bit to 64-bit, run the following command from the Linux 64-bit Oracle Database home:

    Note:

    Refer to Oracle Database Upgrade Guide for more information on changing from 32-bit to 64-bite
Failed to execute dev c++ error 5

C.7.3 Migrating Data To and From ASM

To take advantage of Automatic Storage Management (ASM), you can migrate an Oracle 11g Release 1 (11.1) database into and out of an ASM disk group using Recovery Manager (RMAN). This migration is performed using RMAN even if you are not using RMAN for your primary backup and recovery strategy.

See Also:

Chapter 8, 'Performing ASM Data Migration with RMAN', in Oracle Database Storage Administrator's Guide for more information on migrating databases.Howto: Compiling with the Dev-C++ compiler (under Windows)

In this how to, compilation of C++ sources will be demonstrated using the Bloodshed Dev-C++ compiler under Windows.

1. What is Dev-C++
2. How to download Dev-C++
3. How to open and compile a C++ source file with Dev-C++
4. Disappearing Windows
5. F.A.Qs

1. What is Dev-C++

Dev-C++ is a full-featured Integrated Development Environment (IDE) for the C/C++ programming language. It uses Mingw port of GCC (GNU Compiler Collection) as its compiler. It creates native Win32 executables, either console or GUI (Graphical User Interface). Dev-C++ can also be used in combination with Cygwin.
More information can be found at The Dev-C++ Resource Site.


2. How to download Dev-C++

You can use the following links to download the program (9 MB):

  • http://www.bloodshed.net/dev/devcpp.html
    (Select: Dev-C++ 5.0 beta 9.2 (4.9.9.2) (9.0 MB) with Mingw/GCC 3.4.2)
    or
  • http://prdownloads.sourceforge.net/dev-cpp/
    or
  • devcpp-4.9.9.2_setup.exe (local only)

3. How to open and compile a C++ source file with Dev-C++

After you download and install Dev-C++ (under default folder C:Dev-Cpp), you can open a new (c++) source file as shown in the figure given below:

Then type your c++ code and save it to the hard drive (for example C:windowsdesktopcpp).To compile your source file (say hello.cpp), press Compile button or use Ctrl+F9 key combination.
To run the compiled (executable) file press Run button or use

Execute C++ Program

Ctrl+F10 key combination.
Note that executable file will have the name hello.exe and it would be in the same folder with the source file hello.cpp.

4. Disappearing Windows

If you run your program, you may notice something stange; a console window will pop up, flash some text and disappear suddenly. The problem is that, if directly executed, console program windows close after the program exits. You can get around this problem one of three ways:
  • Method 1
    Add the following code before return 0; statement in main():
    system('pause');
    This will give a message such as Press any key to continue.... After pressing a key, you can return to the compiler editor.
  • Method 2
    Add the following code before return 0; statement in main():
    This will give you a chance to view any output before the program terminates and the window closes.
  • Method 3 - Command-prompt:
    Alternatively, instead of using Dev-C++ to invoke your program, you can just open an MS-DOS Prompt, go to the directory where your program was compiled and enter the program name (along with any parameters). The command-prompt window will not close when the program terminates.
See also: www.uniqueness-template.com/devcpp

5. F.A.Q.s

Failed To Execute In Dev C++ Version

Q.How can I add line numbers?
A. Goto Tools Menu and follow: Tools->Editor Options. Click on the Display tab and then select

Failed To Execute Error 216 Dev C++

Line Numbers.

Failed To Execute Error 127 Dev C++


Q.Can I compile and run my programs in the MS-DOS console?
A. Yes, you can compile and run your codes in the MS-DOS console without using compiler editor.
But first, you have to play with the environment settings. To do that, go to Settings->System->Advanced(Denetim Masası->Sistem->Gelişmiş). And click on the Environmental Variables button. Click on the PATH and modify by adding C:Dev-cppbin string as follows, then press OK.
Now you can open an MS-DOS propmt. Go to Start->Run (Başlat->Çalıştır). Type cmd to open a console.Goto the directory where your programs exist. Compile and run your program (for example hello.cpp as here) as follows:





broken image