Article View: cn.bbs.comp.program
Article #1795Re: ����ȫ�ֱ���������.
From: ����
Date: Sun, 22 Mar 1998 00:00
Date: Sun, 22 Mar 1998 00:00
30 lines
2134 bytes
2134 bytes
> [1;36m==> Guo_Wu(Alight) ˵��: [37;40m[0m
> VC����һ������������������Դ�ļ�������
> ��ͬ�ı�����Ļ�,���������Dz�������,����
> Ҳû�о���.��������ʱ,�����������ĵ�ַ����
> ��ͬһ�������ַ��.��ͻ�����һЩ����,��Ϊ
> ���DZ���ϣ������������ͬ�ı���.
> ��Ϊ��Ҫ���һЩ��̬���ļ�,����б��뱣��
> һЩȫ�ֱ���,Ϊ�˷�ֹ���ú�����ҵ��ļ���
> ȫ�ֱ����ĸ���,������Ӧ�ò�ȡ���ַ���������
> ������Щ����.��Ȼ�Ҳ������ڿ��н���������
> ��static��,��Ϊ�ļ�ʵ��̫��,�����ڲ�ͬ�ļ�
> �ж���Ҫ������Щȫ�ֱ���.
> лл�����.
Yeah, It's a problem. I don't know how to do it. Indeed, if you
compile this package into a DLL, you can control what will be exported.
But I don't know any method to control the exports of standard LIB.
In fact, there are only two kinds of global variables: static and extern.
And if you really want to share the variables among your source files(
a bad habit), I think you can use a very long name to avoid the problem.
Or you could try this:
class MYLIBVARIABLES
{
static int var1, var2;
}
There is only little chance to the user program to use this class name.
--
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Technical Details
Message-ID:
<980322.yGazh$PBBS@bbs.ustc.edu.cn>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: fc86e,6ed48340e1421b6a X-Google-Attributes: gidfc86e,public From: Ambi_A@bbs.ustc.edu.cn (����) Subject: Re: ����ȫ�ֱ���������. Date: 1998/03/22 Message-ID: <980322.yGazh$PBBS@bbs.ustc.edu.cn> X-Deja-AN: 336443860 Organization: �й�ƴ�BBSվ Newsgroups: cn.bbs.comp.program