请问怎么mingw32 make 怎么进入文件夹 怎么总是no such file or directory

在使用C-Free 5编辑C代码时,总是遇到如下错误: 警告我看得懂,但是到底错误在哪里?_百度知道
在使用C-Free 5编辑C代码时,总是遇到如下错误: 警告我看得懂,但是到底错误在哪里?
\3;return&quot: mingw5 - CUI Debug:\Administrator&#92!&#92,这是代码;: 5\Documents and Settings\mingw&#92.c;Administrator&#92..5&#92..[Error] C;未命名1;n&quot: no newline at end of file[Error] gcc.正在编译 C.;bin\gcc&#92:6;Documents and Settings&#92.Hint main(stdio:#include &lt: 5&#92.4;bin\Documents and Settings\Administrator&#92.h&桌面\未命名1:2:&#92:5;mingw\3: 5&#92, char *argv[]){ printf(&quot: No such file or directory[Error] gcc: error: No such file or directory[Error] gcc: syntax error before &未命名1;include\[Warning] C;mingw32\桌面\桌面&#92: warning?请各位高手帮忙……对了。到底错在哪里呀?那个文件头有错吗.5.mingw&#92: No such file or directory[Error]mingw&#92.;mingw&#92.c: 6 个错误.4;lib\mingw32&#92.exe: No such file or directory构建中止 未命名1?为什么总说“没有这样的文件或目录”: 5&#92.exe.c: No such file or directory[Error] gcc, C-F) return 0;c++&#92, 编译器类型--------------------配置: MinGW--------------------检查文件依赖性, 1 个警告如上: 5&#92.
提问者采纳
n&quotwarning!&#92: no newline at end of file printf(&quot, C-F) 这行没有用;Hello
提问者评价
现在可以了
其他类似问题
按默认排序
其他1条回答
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁两天热门文章
最新推荐文章初次使用CodeBlocks,好不容易把环境配好, 编译没有错误了,但是程序并不生成exe,提示以下问题:
mingw32-g++.exe: /W3: No such file or directorymingw32-g++.exe: /EHsc: No such file or directorymingw32-g++.exe: /MD: No such file or directorymingw32-g++.exe: /Ox: No such file or directorymingw32-g++.exe: /DNDEBUG: No such file or directory
根据提示可以看出是编译器设置的问题,可做如下检查:
1、先检查一下是否使用的是GCC编译器:
工程右键-Build Options看看是否是GCC编译器2、在总体/Debug/Release三个设置的链接器开关中把你那些后缀删除即/DEBUG msvcrt.lib等3、可能刚开始建立的VC编译器工程然后又切换成的gcc编译器
我的程序就是这个问题,重新建立了gcc编译器的工程后就OK了。&
阅读(...) 评论()基于ubuntu10.04和ubuntu14.04搭建MTK6577+Android4.04开发环境的问题与解决 - LoongEmbedded的专栏
- 博客频道 - CSDN.NET
2369人阅读
基于ubuntu10.04和ubuntu14.04搭建MTK6577+Android4.04开发环境的问题与解决
1.&&&&&需要的软硬件环境
(1)&&&&操作系统
推荐用ubuntu10.04。
(2)&&&&内存和硬盘空间
内存要求是4GB或以上,我试过用同样的ubuntu10.04,分别在台式机和PC机上编译(内存都为4GB),台式机编译可以通过,但笔记本上就提示内存过小,无法编译,原因目前不清楚。后来笔记本我升级到了6GB,接下来记录环境搭建和编译遇到的问题及解决。
2.&&&&&Ubuntu14.04搭建编译环境时遇到的问题
编译出错:
根据hsimobile77_ics2_preloader.log_error下面的出错提示信息:
wine:'/home/kandi' is not owned by you, refusing to create a configuration directorythere
===BUILD FAIL.tools/pbp/PBP.exe return fail===
可知是因为没有权限创建目录引起的,我改为用root编译就可以了,但整个全部编译需要用了5个半小时的时间。
3.&&&&&Ubuntu10.04搭建编译环境时遇到的问题
3.1& 安装软件和编译工具链(compilation Tool Chain)
(1)&&&&更新APT信息
apt-get update
(2)&&&&安装包
安装的时间建议单独安装,可以清楚知道哪些包是否已经安装,在安装flex的时候,弹出下面的信息:
Reading packagelists... Done
Buildingdependency tree&&&&&&
Reading stateinformation... Done
Package flex isnot available, but is referred to by another package.
This may mean thatthe package is missing, has been obsoleted, or
is only availablefrom another source
解决的办法,是选择下图中main
在安装ia32-libs的时候,提示这个包较老,被淘汰了,需要用其他包来代替:
Reading packagelists... Done
Buildingdependency tree&&&&&&
Reading stateinformation... Done
Package ia32-libsis not available, but is referred to by another package.
This may mean thatthe package is missing, has been obsoleted, or
is only availablefrom another source
However thefollowing packages replace it:
& lib32z1 lib32ncurses5 lib32bz2-1.0
安装lib32readline5-dev时也需要一样的提示:
Reading package lists... Done
Building dependency tree&&&&&&
Reading state information... Done
Package lib32readline5-dev is not available, but isreferred to by another package.
This may mean that the package is missing, has beenobsoleted, or
is only available from another source
However the following packages replace it:
& lib32readline-gplv2-dev
根据系统推荐的包来安装。
安装wine包时,弹出图形界面,如下图:
刚弹出来时OK时黑色的,我记得刚开始自己遇到这样的情况下无法选择OK,后来不经意,选择了向右的键,就可以选择了,在此记录下来,仅仅是作为备忘。
(3)&&&&安装arm-linux-androideabi-4.4.x
解压MTK6577源代码包,文件在下面目录下:
prebuilt\linux-x86\toolchain\arm-linux-androideabi-4.4.x,安装的命令如下:
注意这里的arm和-有一个空格的。
(4)&&&&安装JDK1.6
文件为jdk-6u23-linux-x64.bin,先修改属性然后安装,命令如下:
chmod a+xjdk-6u23-linux-x64.bin
./ jdk-6u23-linux-x64.bin
3.2& 配置编译文件(configure build profile)
解压后的源代码文件夹根目录下有mblden.sh,参考《ALPS_Build_Environment_on_Ubuntu_10.04_64-bit_Installation_SOP_4.0》文档的Configure Build Profile部分,确保源代码根目录下的mblden.sh下的内容如下:
JAVA_HOME=/opt/jdk1.6.0_23
export JAVA_HOME
# OverwriteANDROID_JAVA_HOME environment variable setting if already exists
ANDROID_JAVA_HOME=/opt/jdk1.6.0_23
exportANDROID_JAVA_HOME
# Overwrite PATHenvironment setting for JDK & arm-eabi if already exists
PATH=/opt/jdk1.6.0_23/bin:$PWD/prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin:$PATH
export PATH
这里重点要注意的是JDK和arm-linux-androideabi的版本一定要和安装在系统上的版本一致,而且是所要求的版本。在解压了源代码之后这里是jdk1.6.0.26,我们改为jdk1.6.0.23
然后进入源代码目录下,执行下面的命令:
(1)&&source
此文件设置正确的环境变量。可以直接用export,或者修改脚本。
修改arm-eabi-gcc和java的路径. 即修改mbldenv.sh里面PATH, JAVA_HOME等环境变量,不能使用相对路径。
(2)&&./mknew
情况所有的老文件、库和logo文件等,也会创建需要的目录、删除所有的临时文件和刷新日记文件
在编译源代码之前,先检查编译环境,编译的时候遇到的问题如下:
3.1& 编译遇到的问题和处理步骤
3.1.1&&&&&&&Gcc版本过高问题
(1)&&错误信息
提示信息如下:
[gcc]: unknown(64-bit) [FAIL]
(2)&&解决办法
进入命令:/usr/bin下用 ls -l gcc*命令查看gcc的版本最重要的信息如下:
gcc -& gcc-4.8
表示目前gcc链接版本是gcc-4.8,高于推荐的版本,导致无法编译。那我们只能降低gcc版本为4.4.3
apt-get installgcc-4.4
apt-get installg++-4.4
接着把gcc链接的版本有4.8改为4.4
sudo mv gccgcc.bak&& ------------备份
sudo ln -s gcc-4.4gcc&& ------------重新链接
然后再用ls -l gcc*命令查看gcc的版本最重要的信息如下:
gcc -& gcc-4.4
然后重新编译就不存在此问题了,环境检查输出信息如下:
Build EnvironmentRequirement
=============================================================
* *********Suggested OS and Tool Chain to install *********
*&&&&&& OS&&&&&&&&&&&&&&&&&&&&&&&& : Linux distributionUbuntu 10.04
*&&&&&& Memory Size&&&&&&&&&&&&&&& : 2G or above
*&&&&&& make&&&&&&&&&&&&&&&&&&&&&& : GNU Make 3.81 or above
*&&&&&& perl&&&&&&&&&&&&&&&&&&&&&& : Version 5.10.X
*&&&&&& python&&&&&&&&&&&&&&&&&&&& : Version 2.6.X
*&&&&&& arm-linux-androideabi-gcc& : Version 4.4.X
*&&&&&& gcc&&&&&&&&&&&&&&&&&&&&&&& : Version 4.4.3
*&&&&&& jdk&&&&&&&&&&&&&&&&&&&&&&& : Version 1.6.X
*&&&&&& bison&&&&&&&&&&&&&&&&&&&&& : Version 2.4.X
*&&&&&& flex&&&&&&&&&&&&&&&&&&&&&& : Version 2.5.X
*&&&&&& gperf&&&&&&&&&&&&&&&&&&&&& : Version 3.0.X
*&&&&&& mingw&&&&&&&&&&&&&&&&&&&&& : Installed
*&&&&&& unix2dos/tofrodos&&&&&&&&& : Installed
* **********************************************************
=============================================================
Build EnvironmentCheck Result Report
*************************************************************
[OS]: Ubuntu 14.04(64-bit) [WARNING]
your ubuntu osversion is higher than recommendation
[Physical MemorySize] : 6003508 K-Bytes [OK]
[make]: 3.81(64-bit) [OK]
[perl]: 5.18.2(64-bit) [WARNING]
your perl versionis higher than recommendation
[python]: 2.7.6(64-bit) [WARNING]
your pythonversion is higher than recommendation
[arm-linux-androideabi-gcc]:4.4.3 (32-bit) [OK]
[gcc]: 4.4.7(64-bit) [WARNING]
your gcc versionis higher than recommendation
[jdk]: 1.6.0_23(64-bit) [OK]
[bison]: 3.0.2(64-bit) [WARNING]
your bison versionis higher than recommendation
[flex]: 2.5.35(64-bit) [OK]
[gperf]: 3.0.4(64-bit) [OK]
[mingw]: Installed[OK]
[unix2dos/tofrodos]:Installed [OK]
*************************************************************
MTK源码编译 [gcc]: unknown (64-bit) [FAIL]
3.1.2&&&&&&&indexOfKey’没有声明
(1)&&错误信息
下面给出一小部分:
frameworks/base/include/utils/KeyedVector.h:193:31:error: ‘indexOfKey’ was not declared in this scope, and no declarations werefound by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/AssetManager.h:
frameworks/base/include/utils/KeyedVector.h:193:31:error: ‘indexOfKey’ was not declared in this scope, and no declarations werefound by argument-dependent lookup at the point of instantiation [-fpermissive]
frameworks/base/include/utils/KeyedVector.h:193:31:error: ‘indexOfKey’ was not declared in this scope, and no declarations werefound by argument-dependent lookup at the point of instantiation [-fpermissive]
make[3]: ***[out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/AaptAssets.o] Error 1
(2)&&解决方法
根据网络上给出的解决办法是,在viframeworks/base/libs/utils/Android.mk下面的内容后面加上’-fpermissive’,如下:
LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) &–fpermissive
但是还是一样的编译错误,然后vi frameworks/base/tools/aapt/Android.mk
Add '-fpermissive'to line 31:
LOCAL_CFLAGS +=-Wno-format-y2k –fpermissive
3.1.3&&&&&&&GetState等没有声明
(1)&&错误信息
external/srec/tools/thirdparty/OpenFst/fst/lib/vector-fst.h:233:39:error: ‘GetState’ was not declared in this scope, and no declarations werefound by argument-dependent lookup at the point of instantiation [-fpermissive]
external/srec/tools/thirdparty/OpenFst/fst/lib/fstlib.h:
external/srec/tools/thirdparty/OpenFst/fst/lib/vector-fst.h:214:24:error: ‘Final’ was not declared in this scope, and no declarations were foundby argument-dependent lookup at the point of instantiation [-fpermissive]
external/srec/tools/thirdparty/OpenFst/fst/lib/fstlib.h:
external/srec/tools/thirdparty/OpenFst/fst/lib/vector-fst.h:325:37:error: ‘SetInputSymbols’ was not declared in this scope, and no declarationswere found by argument-dependent lookup at the point of instantiation[-fpermissive]
(2)&&解决方法
百度,获取到的信息说是gcc和g++版本太高,所以重新安排4.4版本并重新定向。
sudo apt-getinstall gcc-4.4
sudo apt-get install g++-4.4
sudo rm -rf /usr/bin/gcc /usr/bin/g++
sudo ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
sudo ln -s /usr/bin/g++-4.4 /usr/bin/g++
3.1.4&&&&&&&没有找到zconf.h文件
(1)&&错误信息
/usr/include/zlib.h:34:fatal error: zconf.h: No such file or directory
system/core/gpttool/gpttool.c:
make[3]: ***[out/host/linux-x86/obj/EXECUTABLES/gpttool_intermediates/gpttool.o] Error 1
(2)&&解决方法
原因是zlib1g-dev有个头文件修改了路径,及zconf.h放到了/usr/include/x86_64-linux-gnu/,所以将其拷贝到/usr/include/下即可了
3.1.5&&&&&&&Switch.pm出错
(1)&&错误信息
Can't locateSwitch.pm in @INC (you may need to install the Switch module) (@INC contains:/etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2/usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18/usr/local/lib/site_perl
.) at external/webkit/Source/WebCore/make-hash-tools.plline 23.
BEGINfailed--compilation aborted atexternal/webkit/Source/WebCore/make-hash-tools.pl line 23.
make[3]: ***[out/target/product/hsimobile77_ics2/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/html/DocTypeStrings.cpp]Error 2
(2)&&解决方法
安装libswitch-perl
sudo apt-getinstall libswitch-perl&
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:539756次
积分:9320
积分:9320
排名:第731名
原创:328篇
转载:305篇
评论:403条
文章:87篇
阅读:119737
(1)(7)(1)(13)(28)(16)(37)(18)(12)(42)(28)(19)(23)(13)(8)(14)(7)(16)(9)(10)(5)(14)(14)(15)(7)(1)(7)(1)(9)(9)(5)(3)(8)(24)(11)(5)(8)(4)(4)(5)(3)(4)(5)(6)(5)(5)(8)(7)(4)(3)(13)(8)(10)(16)(16)(41)[已解决]qsciscintilla.h no such file or directory
编译kscope-1.9.4的时候,遇到编译错误:
qsciscintilla.h no such file or directory
找了一下,发现此处该文件是放在/usr/include/qt4/Qsci/ 下面,
所以,觉得很简单的,在makefile里面加上对应的路径应该就可以了。
不过,去kscope下一看,无语了,起Makefile是QT的qmake弄出来的,
不熟悉,没搞懂到底在哪里加这些类似于-I/usr/include/qt4/Qsci/的编译参数的,
索性,直接去对应文件里面,把绝对路径加上去了,
但是这只能解决一个文件的编译问题,其他还有N 个文件包含这类头文件呢,
所以,不能一个个加。。。
被搞的险些打算放弃了。。。
[解决办法]
后来,无意间,想到一个办法,那就是:
看到编译的时候,文件都是类似如下这样编译的:
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtXml -I/usr/include/qt4 -I.. -I/usr/include/Qsci -I. -Irelease -I. -o release/queryresultdock.o queryresultdock.cpp
而我去/usr/include/下看,没有Qsci文件夹,而只有/usr/include/qt4/Qsci,所以,想到做个软链接,名字就叫Qsci,链到/usr/include/qt4/Qsci,应该就可以了。
结果还没权限,所以最后这样才可以:
sudo ln -s /usr/include/qt4/Qsci/ Qsci
这就解决了找不到头文件所在路径的问题了。
然后,终于可以编译过了。。。。
的确像网上某位说的,kscope的makefile,的确是很搓。。。
2015年五月
11121314151617
18192021222324
25262728293031
免费的格式化Javascript源码的网站
查询Unicode字符,且还带Oct,Decimal,Hex,HTML Entity
HTML和Javascript都支持,很好用。

我要回帖

更多关于 mingw下载 的文章

 

随机推荐