Dev-C ++ FAQ

Source: Internet
Author: User

Dev-C ++ FAQ

Click here for Dev-C ++ 5 FAQ
Last Update: 27/09/2000

Questions:
1. When I compile my dos program and execute it, Dev-C ++ minimizes and then restore in a second but nothing appears?
2. When executing my dos program, it closes automatically. How I can change this?
3. after linking, I get the error "C:/DEV-C ++/lib // libmingw32.a (main. O )(. text + 0x8e): Undefined reference to 'winmain @ 16'
4. When I launch Dev-C ++ I get the message saying "wininet. dll not found "?
5. When I compile a file, I get a message saying "cocould not find <FILENAME>"
6. the EXE files created are huge. What can I do to reduce the size?
7. Under Windows NT, every time I launch Dev-C ++ I get the message "failed to set data"
8. When I try to compile I get: LD: cannot open crt2. O: no such file or directory. What can I do?
9. How can I use the OpenGL library and others?
10. When I compile a file that contains references to Windows filename (like </mydir/myfile. h>), I get a 'uncognized escape sequence 'message?
11. Is there any GUI library or packages available for Dev-C ++?
12. I am having problems using Borland specific functions such as clrscr ()
13. The toolbars icons are showing incorrectly.
14. It seems I 've found a problem/bug that is not specified here. What should I do?
15. When attempting to create a setup program, I get the error "file bin/setup.exe not found ".
16. How to Use assembly (ASM) with Dev-C ++?


Answers:
1. When I compile my dos program and execute it, Dev-C ++ minimizes and then restore in a second but nothing appears?

When creating a console application, be sure to uncheck "do not create a console" in project options (when working with source files only uncheck "create for Win32" in compiler options ).

2. When executing my dos program, it closes automatically. How I can change this?

You can use an input function at the end of you source, like the following example:

# Include <stdlib. h>
Int main ()
{
System ("pause ");
Return 0;
}

3. after linking, I get the error "C:/DEV-C ++/lib // libmingw32.a (main. O )(. text + 0x8e): Undefined reference to 'winmain @ 16'

You probably haven'tdeclared any main () function in your program. Otherwise, try recompiling a second time.

4. When I launch Dev-C ++ I get the message saying "wininet. dll not found "?

If you are missing wininet. dll on your windows system, you can download it at: http://www.rocketdownload.com/supfiles.htm

5. When I compile a file, I get a message saying "cocould not find <FILENAME>"

Check in compiler options if the direcories settings are correct. With a default setup, you shoshould have:

C:/DEV-C ++/bin/
C:/DEV-C ++/include/
C:/DEV-C ++/include/
C:/DEV-C ++/lib/

6. the EXE files created are huge. What can I do to reduce the size?

If you want to reduce your EXE file size from 330 Ko to 12 Ko for example, go to compiler options. then click on the linker page and uncheck "Generate debug information ". this will remove debugging information (if you want to debug, uncheck it ). you can also click on optimization page and check "Best optimization ".

7. Under Windows NT, every time I launch Dev-C ++ I get the message "failed to set data"

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. sheet.

8. When I try to compile I get: LD: cannot open crt2. O: no such file or directory. What can I do?

Go to compiler options, and check if the lib directory is correctly set:
C:/dev-C ++/lib/
(For a default installation ).

If this still doesn't work, try copying the file lib/crt2.o to your Dev-C ++'s bin directory.

9. How can I use the OpenGL library and others?

All the libraries that comes with mingw reside in the lib directory. They are all named in the following way: lib *.
To link a library with your project, just add in project options, further option files:
-Lopengl32
This is for including the libopengl32.a library. To add any other library, just follow the same syntax:
Type-l (L in lowercase) plus the base name of the Library (filename without "lib" and the ". A" extension ).

10. When I compile a file that contains references to Windows filename (like </mydir/myfile. h>), I get a 'uncognized escape sequence 'message?

The mingw compiler understands paths in the UNIX style (/mydir/myfile. h). Try replacing the/in the filename/

11. Is there any GUI library or packages available for Dev-C ++?

You can download extra packages for Dev-C ++ at http://www.bloodshed.net/dev/

12. I am having problems using Borland specific functions such as clrscr ()

Include conio. h To your source, and add C:/dev-C ++/lib/conio. o to "further object files" in project options (where C:/dev-C ++ is where you installed Dev-C ++)

13. The toolbars icons are showing incorrectly.

On some screen resolutions, toolbars icons may show up incorrectly. You shocould try changing your screen resolution, or disable toolbars from the View menu in Dev-C ++

14. It seems I 've found a problem/bug that is not specified here. What should I do?

First, you shoshould try doing a "check for Dev-C ++ Update" (In help menu) to know if a new version has come that may correct this problem. if there are no new version or the problem wasn't fixed then please send an email describing the bug to: webmaster@bloodshed.net

15. When attempting to create a setup program, I get the error "file bin/setup.exe not found ".

If you are willing to use the setup creator feature of Dev-C ++, You need to download and install this file

16. How to Use assembly with Dev-C ++?

The specified er uses at&t (not Intel). Here's an example of such a Syntax:

// 2 global variables

Int adrio;
Static char valio;

Void myfunction (..........)
{
_ ASM ("mov % dx, _ adrio"); // loading 16 bits register
_ ASM ("mov % Al, _ valio"); // loading 8 bits register

/*
Don't forget the underscore _ before each global variable names!
*/
_ ASM ("mov % dx, % ax"); // ax --> DX
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.