分享
 
 
 

Dev-C++ FAQ

王朝c/c++·作者佚名  2006-03-12
窄屏简体版  字體: |||超大  

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 "could 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 for”

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 'unrecognized 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’t declared 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 "could not find <filename> "

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

C:\DEV-C++\Binc:\DEV-C++\Includec:\DEV-C++\Includec:\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 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. 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 to:

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*.a

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 'unrecognized escape sequence' message ?

The Mingw compiler understands paths in the Unix style (/mydir/myfile.h). Try replacing the \ in the filename by /

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 should 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 should 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 assembler 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

}

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有