简体   繁体   English

如何在Debian 8上编译旧的32位C ++ G ++ 3.3.2源代码?

[英]How to compile old 32 bit c++ g++ 3.3.2 source code on debian 8?

Install g++ 3.3 on Debian 8 => not available. Debian 8上安装g++ 3.3 =>不可用。 Compile with g++ 4.9 and -m32 and -g++-3.3.2 or -std=c++98 or -std=c++03 options but it doesn't work. 使用g++ 4.9-m32 and -g++-3.3.2 or -std=c++98 or -std=c++03选项进行-m32 and -g++-3.3.2 or -std=c++98 or -std=c++03但是它不起作用。 There are header files missing. 缺少头文件。

Do I have to install old Debian version and old g++/gcc to compile this old code ? 我需要安装旧的Debian版本和旧的g++/gcc来编译此旧代码吗?

###### NEW ######新

I installed Ubuntu 5.10 and g++ 4. Now no header missing but problems with c++ code. 我安装了Ubuntu 5.10和g ++4。现在没有标题丢失,但是c ++代码有问题。 C++ dialect problem ? C ++方言有问题吗?

http://davalo.de/7847test/Source/errors_messages3.txt http://davalo.de/7847test/Source/errors_messages3.txt

m_pArray and m_MaxListSize no declaration in the scope error: m_pArray和m_MaxListSize在范围错误中没有声明:

 template<class T, int size> class ObjArray : public BaseObjArray<T> { public: ObjArray() { m_pArray = m_Array; m_MaxListSize = size; } private: T m_Array[size]; }; 

Indeed, the most you can do with today old stable (debian 8 jessie) is to force the install of the oldest gcc version which is 4.8. 确实,对于今天较旧的稳定版(debian 8 jessie),您能做的最多就是强制安装最旧的gcc版本4.8。

But there are some repo containing older versions of gcc… like almost everything: 但是有些仓库包含旧版本的gcc…几乎所有东西:

Deb (debian) Pool main Deb(debian) 主池

or 要么

Deb (ubuntu) Pool universe Deb(ubuntu) 池宇宙

And force install of your compatible version. 并强制安装您的兼容版本。

What is the gap when you build with newer gcc 4.8…? 使用较新的gcc 4.8进行编译时有什么差距? What kind of errors do you have, how many? 您有什么样的错误,有多少? The best would be to fix the code. 最好的办法是修复代码。

Ubuntu 5.10 with g++ downgrade to 3.3 dit it. 带有g ++的Ubuntu 5.10降级至3.3。 No error.No warnings. 没有错误,没有警告。 And all in virtual machine Vmware on win7 host, because I don't have IDE cdrom or floppy. 而且全部在win7主机上的虚拟机Vmware中,因为我没有IDE cdrom或软盘。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM