‘壹’ 编译x264时出现 No working C compiler found.
如果是用mingw平台编译的,需要配置你的mingw/bin目录到PATH路径下。确定路径配置正确后,还不可以。如果用的是最新的x264,之前的mingw平台版本太低,升级mingw平台就可以了。
‘贰’ x什么意思c语言视频教程
c语言x的含义是转义字符
告诉编译器需要用特殊的方式进行型旁处理。x表示后面的字符是十六进制数, 表示后面的字符是八进制数。
尽管C语言提供了许多低级处理的功能,但仍然保持着跨平台的特性,以一个标准规格写出的C语言程序可在庆袜包括类似嵌入式处理器以及超级计算机等作业平台的许多计算机平台上进行编译。
‘叁’ 如何编译openssl x64
使用VS2005下的Visual Studio 2005 Command Prompt进入控制台模式陪搜(这个模式会自动设置各种环境变量)
、解压缩openssl的包,进入openssl的目录
、perl configure VC-WIN32
尽量在这个目录下执行该命令,否则郑祥找不到Configure文件,或者指定完芦丛历整的Configure文件路径。
、ms\do_ms
在解压目录下执行ms\do_ms命令
、nmake -f ms\ntdll.mak编译后在openssl解压目录下执行,完成编译后。输出的文件在out32dll里面,包括应用程序的可执行文件、lib文件和dll文件
注意:在运行第五步时,cl编译器会抱怨说.\crypto\des\enc_read.c文件的read是The POSIX name for this item is deprecated(不被推荐的),建议使用_read。呵呵,我可不想将OpenSSL中的所有的read函数修改为_read。再看cl的错误代码 error C2220,于是上MSDN上查找:
warning treated as error - no object file generated
/WX tells the compiler to treat all warnings as errors. Since an error occurred, no object or executable file was generated.
是由于设置了/WX选项,将所有的警告都作为错误对待,所以。。。
于是打开OpenSSL目录下的MS目录下的ntdll.mak文件,将CFLAG的/WX选项去掉,存盘。
‘肆’ 编译x时候错误求助
#include <iostream>
using namespace std;
class Complex
{
private:
double real, imag;
public:
Complex(double r = 0.0, double i = 0.0) {real = r; imag = i;}
Complex(const Complex &c);
Complex add(const Complex &c);
Complex sub(const Complex &c);
Complex mul(const Complex &c);
Complex dev(const Complex &c);
Complex mi(int k);
void print();
};
Complex::Complex(const Complex &c)
{
real = c.real;
imag = c.imag;
}
Complex Complex::add(const Complex &c)
{
Complex tmp;
tmp.real = real + c.real;
tmp.imag = imag + c.imag;
return tmp;
}
Complex Complex::sub(const Complex &c)
{
Complex tmp;
tmp.real = real - c.real;
tmp.imag = imag - c.imag;
return tmp;
}
Complex Complex::mul(const Complex &c)
{
Complex tmp;
tmp.real = real * c.real - imag * c.imag;
tmp.imag = imag * c.real + real * c.imag;
return tmp;
}
Complex Complex::dev(const Complex &c)
{
if(c.real == 0 && c.imag == 0)
{
cout << "除数为零" << endl;
return *this ;
}
double x;
Complex tmp1;
Complex tmp2;
tmp1.real = (real * c.real) - (imag * c.imag);
tmp1.imag = (real * c.imag) + (imag * c.real);
x = (real * c.real) + (imag * c.imag);
tmp2.real = tmp1.real / x;
tmp2.imag = tmp1.imag / x;
return tmp2;
}
Complex Complex::mi(int k)
{
int i;
Complex tmp;
if(k == 0) tmp = Complex(1,0);
tmp = *this;
for(i = 0; i < k; i++)
{
tmp = tmp.mul(tmp);
};
return tmp;
}
void Complex::print()
{
if(real != 0 || imag == 0)
cout << real;
if(imag > 0)
cout << '+' << imag << 'i';
if(imag < 0)
cout << imag << 'i';
}
int main()
{
int k;
Complex c1 = Complex(2.0, 5.0);
Complex c2 = Complex(4.0, 4.0);
cout << "Create Complex c1 = 2 + 5i, c2 = 4 + 4i" << endl;
cout << "和禅c1 : ";
c1.print();
cout << "c2 : ";
c2.print();
cout << "Compute c1 = c1 + c2" <逗棚芹< endl;
c1.add(c2);
cout << "c1 = ";
c1.print();
cout << "Compute c1 = c1 - c2" << endl;
c1.sub(c2);
cout << "c1 = ";
c1.print();
cout <山毕< "Compute c1 = c1 * c2" << endl;
cout << "c1 = ";
c1.mul(c2);
c1.print();
cout << "Compute c1 = c1 / c2" << endl;
cout << "c1 = ";
c1.dev(c2);
c1.print();
cout << "输入k(需为自然数),c1 = c1^k(k次方)" << endl;
cin >> k;
cout << "c1 = ";
c1.mi(k);
c1.print();
cout << "Copy c1 to Complex c3" << endl;
Complex c3 = Complex(c1);
cout << "c3 = ";
c3.print();
return 0;
}
‘伍’ 将win32的程序编译为x64,其中win32用到了kernel32.dll这样的dll,请问在x64位中可以继续使用吗
kernel32.dll, user32.dll, netapi32.dll 等库在 64 位 windows 系统、64 位应用程序中依然可以使用,这是因为针对 32 位程序和 64 位程序,windows 提供了两个不同的版本,分别位于系统目录 system32 和 syswow64 下面,虽然两个目录下的库文件使用了相同的名字,但实际上是不一样的。
‘陆’ 如何在ubuntu,suse,redhat下编译X server
ubuntu适合娱乐redhat主要做企业级服务,适合学习技术RPM包和告歼DEB包的区别在袭友悄于采用不同的管理方式!前者将源代码打包成RPM格式,采拍渣用RPM的管理方法。后者打包成DEB的格式。
‘柒’ 编译器中为什么X^2不对,X*X是对的
您好,说一下原理:
x=x*2;
编译器在语法翻译的时候最御枣终会用逆波兰式来表示(其他的也可以的)
也就是翻译成x*=2的形式好皮。
所以友拆差我们书写的时候把x=x*2写成x*=2,可以提高程序的效率。
大三的时候编译原理有讲的。