jjzjj

c - Qt 5.2.1 错误 “collect2.exe: Id returned 1 exit status”

coder 2024-06-09 原文

当我尝试构建我的应用程序时,出现以下错误。任何的想法? 我在 Win8 上使用 Qt 5.2.1 和 MinGW 4.8 32 位

16:14:47: Running steps for project test2...
16:14:47: Configuration unchanged, skipping qmake step.
16:14:47: Starting: "C:\Qt\Tools\mingw48_32\bin\mingw32-make.exe" 
C:/Qt/Tools/mingw48_32/bin/mingw32-make -f Makefile.Debug
mingw32-make[1]: Entering directory 'C:/Users/ha/Desktop/build-test2-Desktop_Qt_5_2_1_MinGW_32bit-Debug'
g++ -Wl,-subsystem,console -mthreads -o debug\test2.exe debug/main.o  
debug/main.o: file not recognized: File truncated
collect2.exe: error: ld returned 1 exit status
Makefile.Debug:77: recipe for target 'debug\test2.exe' failed
mingw32-make[1]: *** [debug\test2.exe] Error 1
mingw32-make[1]: Leaving directory 'C:/Users/ha/Desktop/build-test2-Desktop_Qt_5_2_1_MinGW_32bit-Debug'
makefile:34: recipe for target 'debug' failed
mingw32-make: *** [debug] Error 2
16:14:48: The process "C:\Qt\Tools\mingw48_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project test2 (kit: Desktop Qt 5.2.1 MinGW 32bit)
When executing step 'Make'
16:14:48: Elapsed time: 00:00.

最佳答案

这一行:

debug/main.o: file not recognized: File truncated

告诉您文件 main.o 没有正确创建。从菜单中选择“重建”,或者删除该文件并再次“构建”。

当您在编译器输出目标文件时中断编译器时,通常会发生这种情况。

关于c - Qt 5.2.1 错误 “collect2.exe: Id returned 1 exit status”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22940186/

有关c - Qt 5.2.1 错误 “collect2.exe: Id returned 1 exit status”的更多相关文章

  1. ruby-on-rails - 正确的 Rails 2.1 做事方式 - 2

    question的一些答案关于redirect_to让我想到了其他一些问题。基本上,我正在使用Rails2.1编写博客应用程序。我一直在尝试自己完成大部分工作(因为我对Rails有所了解),但在需要时会引用Internet上的教程和引用资料。我设法让一个简单的博客正常运行,然后我尝试添加评论。靠我自己,我设法让它进入了可以从script/console添加评论的阶段,但我无法让表单正常工作。我遵循的其中一个教程建议在帖子Controller中创建一个“评论”操作,以添加评论。我的问题是:这是“标准”方式吗?我的另一个问题的答案之一似乎暗示应该有一个CommentsController参

  2. java - Ruby 相当于 Java 的 Collections.unmodifiableList 和 Collections.unmodifiableMap - 2

    Java的Collections.unmodifiableList和Collections.unmodifiableMap在Ruby标准API中是否有等价物? 最佳答案 使用freeze应用程序接口(interface):Preventsfurthermodificationstoobj.ARuntimeErrorwillberaisedifmodificationisattempted.Thereisnowaytounfreezeafrozenobject.SeealsoObject#frozen?.Thismethodretur

  3. ruby-on-rails - rails 上的 ruby : radio buttons for collection select - 2

    我有一个集合选择:此方法的单选按钮是什么?谢谢 最佳答案 Rails3中没有这样的助手。在Rails4中,它是collection_radio_buttons. 关于ruby-on-rails-rails上的ruby:radiobuttonsforcollectionselect,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/18525986/

  4. ruby-on-rails - rails : render a collection of models using an specific html view - 2

    我有以下关于rails的简单问题。假设我有一个模型用户。在View中,如果我这样做:views/user/_user.html.erb中的文件View将为每个用户调用和打印。如何更改它以使用特定View?我需要这样的东西:User.all:template=>"user/_user_2ndview.html"%>有什么帮助吗?提前致谢 最佳答案 您可以使用collection选项:User.all,:partial=>"users/user2ndview",:as=>:user%>View必须放在views/users/_user2

  5. ruby - 将 Ruby 2.1 编译为字节码 - 2

    同时Ruby1.9wascompilingtobytecode,它无法将预编译的脚本保存到磁盘。我们被告知期待Ruby2toallowsavingcompiledbytecode到磁盘,但我没有听到太多关于它的讨论,也没有看到无数的博客文章描述如何通过编译获得性能,我希望看到它是否真的在Ruby2.x的某个地方实现。AfocusedGooglesearch似乎没有返回任何有用的东西。在2.1(或更早版本)中可以吗?如果没有,这是否仍在路线图上? 最佳答案 有一半可能。从here下载扩展并编译它。需要库iseq.so好的,现在字节码的

  6. ruby - Vpim::Vcard - 解析 vcard 2.1 - 2

    我的代码必须解析Vcard2.1格式。我正在使用vpim(没有其他库)当我运行Vpim::Vcard.decode(data)时出现错误:undefinedmethod`each'for#堆栈跟踪:NoMethodError(undefinedmethod`each'for#):vpim(0.695)lib/vpim/rfc2425.rb:82:in`unfold'vpim(0.695)lib/vpim/rfc2425.rb:308:in`decode'vpim(0.695)lib/vpim/vcard.rb:692:in`decode'app/models/event.rb:71:i

  7. ruby-on-rails - rails "undefined method for ActiveRecord_Associations_CollectionProxy" - 2

    我有这个模型:classStudent如果我在我的movies_controller.rb中写这个:@students=@movie.cinema.companies.students.all我有这个错误:#Company::ActiveRecord_Associations_CollectionProxy:0x00000007f13d88的未定义方法“学生”>如果我这样写:@students=@movie.cinema.companies.find(6).students.all它向我显示了我的select_collection中的正确学生。如何更好地理解这个过程?更新:我需要这部电

  8. ruby-on-rails - ruby rails : How to sort a collection_select - 2

    我想按数据库表列“plays”对其进行排序/排序(按我想要的方式降序或升序)我完全糊涂了。刚刚找到了select而不是collection_select的解决方案?我的一些代码不知道如何排序/排序数据库表中还有一些列,如“plays”、“goals”... 最佳答案 只需将实际排序的集合传递给collection_select助手:collection_select(:post,:author_id,Author.order('created_atDESC'),:id,:name_with_initial,:prompt=>true

  9. ruby-on-rails - 如何使用 grouped_collection_select 显示多选? - 2

    我正在使用以下代码来显示类别的TreeView选择框:grouped_collection_select(:categories,:category_id,Category.top_level,:children,:name,:id,:name,:include_blank=>true)如何更改它以允许多选?此外,是否可以让它显示复选框而不是选择框? 最佳答案 尝试grouped_collection_select(:categories,:category_id,Category.top_level,:children,:name

  10. ruby-on-rails - Rails 3.2 ActiveAdmin 'Collection is not a paginated scope.' 错误 - 2

    我正在使用Rails3.2和ActiveAdmin0.4.4开发应用程序。我有一个名为Teaser的模型(/app/models/teaser.rb):classTeasertruemount_uploader:img,TeaserUploaderend然后我向其中添加了ActiveAdmin(/app/admin/teaser.rb):#encoding:UTF-8ActiveAdmin.registerTeaserdoformdo|f|f.inputs"Teaser"dof.input:name,:label=>'Текст'f.input:url,:label=>'Ссылка'

随机推荐