由买买提看人间百态

topics

全部话题 - 话题: devc
(共0页)
k**f
发帖数: 372
1
来自主题: Programming版 - 请教c++里函数调用的问题

You need to create a project in DevC++ and add both cpp files to the project.
Including the .h file makes the compiler happy, i.e., it can generate code
to call the function per the function prototype in the header file.
But if the function is implemented in another .cpp and not included in main.
cpp, the linker need to see the object code to put the executable.
That's why a non trivial program in C almost always needs a project file in
IDEs like VC++ and DevC++, or a makefile with the traditio
s*******o
发帖数: 18
2
来自主题: CS版 - 问个DEVC的使用问题
最近看C++prim
故而用到这一编辑器,但我发现在头文件中定义了类,类中含有一静态变量,并在头文
件里类定义之外初始化。这样问题便出现了,我在另一源文件输出此变量时,总是无法
做到更新。就是说,我在头文件里变了值,而仍然输出原来的值。不知什么缘故。
e****r
发帖数: 581
3
来自主题: CS版 - 问个DEVC的使用问题
paste ur code plz
s*******o
发帖数: 18
4
来自主题: CS版 - 问个DEVC的使用问题
for example:
//ex.h
class ex
{
public:
static int a;
};
int ex::a=6;
//ex.cpp
#include
#include"ex.h"
using namespace std;
int main()
{
cout< system"pause";
return 0;
}
and when using vs6.0 ,no such problem
p*****c
发帖数: 20
5
来自主题: Programming版 - 请教c++里函数调用的问题
我用的是DevC++.同时打开主函数main.cpp和函数文件cal_sum.cpp,编译主函数的时候
出现undefined reference 错误。
m********a
发帖数: 1312
6
来自主题: Programming版 - 请教c++里函数调用的问题
DevC++界面我不熟,至少因该有个log窗口可以看到compile和link command。
感觉你的link command只有main.o,漏掉了cal.o。
许多时候如果你依赖IDE自动编译,好像至少要搞个project之类的东西,这样才能保证
compile, link所有源文件。
p*****c
发帖数: 20
7
来自主题: Programming版 - 请教c++里函数调用的问题
我试了一下VC++6,在里面建了一个project,然后加入所有的文件,运行正常。不过
没试过在devC++下面建立project。
l********a
发帖数: 1154
8
来自主题: Programming版 - 有人用DEV-C++吗?
devc++很容易崩溃哦
我换code::blocks了
n****g
发帖数: 150
9
来自主题: Computation版 - lapack安装问题
hiahia,我用的就是windows版的,把下载的include和lib
目录考到flashdriver里,学校网络硬盘上装个免费dev-c++,
每次project-》option里添加liblapack.a,再把
flashdriver的目录告送devc++就okay
(共0页)