ChinaNet
标题:
在Cygwin下安装Geant4的心得以及可能出现的问题解决方法汇总
[打印本页]
作者:
鸿飞冥冥
时间:
2015-4-8 09:52
标题:
在Cygwin下安装Geant4的心得以及可能出现的问题解决方法汇总
1 切记按照Windows CygWin installation notes所罗列的内容进行替换。
2 其中主要是make.exe文件,否则可能会引起如下编译错误 ----------- common.gmk:36: *** target pattern contains no `%'. Stop. Starting build... GNUmakefile:55: *** target pattern contains no `%'. Stop. -----------
3 若出现如下错误,则可能是由cygwin在安装时选择的默认文本文件类型不正确导致。需要重新安装cygwin。【国内有其镜像,
http://www.cygwin.cn
】。选择“File Type: Unix / binary”
Libmap stage. Searching for GNUmakefiles and sorting ...Weeding out paths and files ...
: No such file or directoryfile
: No such file or directoryr/GNUmakefile
: No such file or directoryGNUmakefile
: No such file or directoryement/GNUmakefile
: No such file or directorying/GNUmakefile
Making libname.map ...
Reading library name map file...
ERROR: "source/<unique-sub-path>/GNUmakefile" expected.
make[1]: *** [libmap] Error 1
make: *** [all] Error 2
4 记得更新cygwin.bat文件为@echo off
call "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat"
C:
chdir C:\cygwin\bin
bash --login -i
其中,主要目的是指定VC编译环境变量【其中路径根据自行安装路径修改】。必须确保在启动cygwin时屏幕有如下类似回显
Setting environment for using Microsoft Visual Studio 2003 x86 tools.
Attempting to detect a Microsoft Visual Studio installation
Targeting Windows XP 32 DEBUG
5 确保系统路径中不存在其他类似make.exe或者其他编译器程序,如gmake.exe等;若出现如下错误Making libname.map ... /usr/bin/sh: line 1: c:/geant4/geant4.9.1.p01/lib/WIN32-VC/liblist: No such file or directory gmake[1]: *** [libmap] Error 127 gmake: *** [all] Error 2;说明路径中存在gmake.exe而引发错误,需要将其从路径中除去或暂时改名。
转自
www.52mc.net
欢迎光临 ChinaNet (http://www.nuclear.net.cn/)
Powered by Discuz! X3.1