bochs compile 编译

记得安装gcc,g++,unzip,zip

3.4.4. Compiling on Win32 with Microsoft VC++

The standard compile uses the configure script, but the Windows platform cannot run the configure script natively. The current solution to this problem is that the Bochs configure script must be run on a different platform that does support shell scripts, with options that cause it to configure for a Win32 platform instead of the native one. Many people have access to a UNIX machine that could run the configure script, or you can use Cygwin or MinGW/MSYS to run the configure script. [3].

Download the Bochs sources on a machine that can run shell scripts. Edit the configure shortcut script .conf.win32-vcpp if you want to adjust the configure options. Then type these commands in the Bochs source directory:

sh .conf.win32-vcpp
  make win32_snap

These commands will run the configure step, produce VC++ makefiles and workspace files, and pack it all into a .zip file in the directory above the source directory [4]. The .zip file is all ready to transfer to the target Windows machine to be unzipped and compiled. Or, if you run the sh/make steps in Cygwin, you are already on the target machine so you don't need the .zip file.

When you have the Win32 sources transferred to a Windows machine with VC++, find the workspace file called bochs.sln in the folder "vs2013" and load it in VC++. Choose Project:Set Active Project and be sure that "bochs" is selected. Then choose Build:Build bochs.exe. This will build all the required libraries (iodev, cpu, etc.) and the auxiliary programs bximage.exe, bxhub.exe and niclist.exe.

Using workspaces is easy and intuitive, but there is one caveat. The workspaces come directly out of a ZIP file in build/win32/vs2013ex-workspace.zip, and they are not controlled by the configure script. When you compile with certain configure options (e.g. --with-sdl) you need to link with additional libraries. For now you must add them to the VC++ workspace by hand. In version 2.0, we have improved the situation considerably by adding #if...#endif around every optional file and including nearly every Bochs source file in the workspace. This solves the problem of having to manually add source files to the workspace when you turn on configure options such as --enable-debugger. The problem of adding link libraries remains unresolved.

Tip: To compile with the Bochs debugger enabled, add --enable-debugger to the configure line in .conf.win32-vcpp before running it. No modifications to the workspace are necessary.

An alternative way to compile is to run nmake.exe in an MS-DOS window. Instead of using the workspace files, nmake uses the Bochs makefiles that are generated by configure. The nmake method is currently used to build the release binaries.

The make install doesn't work with nmake yet. Currently it must be run inside of Cygwin or MinGW/MSYS and requires the environment variable INSTDIR to be set.

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • gcc x64 asm 内联汇编尝试

    asm volatile(assembler template : output : input : clobber);

    战神伽罗
  • delphi使用bcb的c++ .obj .o,lazarus x64内联汇编,att和intel

    The {$ASMMODE XXX} directive informs the compiler what kind of assembler it can ...

    战神伽罗
  • What are x509 certificates? RFC? ASN.1? DER?

    So, RFC means Request For Comments and they are a bunch of text files that descr...

    战神伽罗
  • 网络上可靠的通讯(CS GT)

    本文研究发送者-接收者博弈,其中发送者和接收者是通信网络中两个不同的节点。因此,发送方和接收方之间的通信是间接的。本文研究的问题是何时有可能将直接传播博弈的均衡...

    用户7454091
  • 【UVALive 3905】BUPT 2015 newbie practice #2 div2-D-3905 - Meteor

    http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102419#problem/D

    饶文津
  • Gazebo機器人仿真學習探索筆記(四)模型編輯

    模型編輯主要是自定義編輯物體模型構建環境,也可以將多種模型組合爲新模型等,支持外部模型導入,

    zhangrelay
  • 独角兽与数列(置换群循环)- HDU 4985

    群论是法国数学家伽罗瓦(Galois)的发明。伽罗瓦是一个极具传奇性的人物,年仅21岁就英年早逝于一场近乎自杀的决斗中。他用该理论,具体来说是伽罗瓦群,解决了五...

    ACM算法日常
  • VS.Net 2005 Design-Time Integration

    Introduction This article provides an overview of the VS.NET 2005 Design-Time I...

    张善友
  • Evaluating the linear regression model评估线性回归模型

    In this recipe, we'll look at how well our regression fits the underlying data. ...

    到不了的都叫做远方
  • Linux命令行基础

    AT&T公司于20世纪70年代发布了UNIX系统。经过多年的发展,Unix不再是某一个具体操作系统的名称,而是对遵循Unix规范、设计和哲学的一类操作系统的统称...

    雪飞鸿

扫码关注云+社区

领取腾讯云代金券