zoukankan      html  css  js  c++  java
  • Eclipse CDT、MingGW 遇到的一些错误汇总

    1.写代码时报错 “Member declaration not found”

    如图:

    在StackOverflow上找到的答案:
    出问题的地方是 CDT的新功能 代码检查
    Open Windows -> Preferences -> C/C++ -> Code Analysis and change the setting to suit your needs.
    我们去上面的地方把出现error改成info或者warning即可

    2.launch failed binary not found

    原因是运行之前还没有build,所以没有可执行的二进制文件,原先我用的ide都是自动build的,所以在eclipse中感到不习惯。要想启用auto build需要去Preference里的workspace选中下图两项,并应用

    3.Linker找不到.a文件

    D:/mingw-w64/mingw-w64/x86_64-4.9.2-posix-seh-rt_v3-rev1/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:oostlib/libboost_program_options-mgw34-mt-d-1_59.a when searching for -lboost_program_options-mgw34-mt-d-1_59
    D:/mingw-w64/mingw-w64/x86_64-4.9.2-posix-seh-rt_v3-rev1/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:oostliblibboost_program_options-mgw34-mt-d-1_59.a when searching for -lboost_program_options-mgw34-mt-d-1_59
    D:/mingw-w64/mingw-w64/x86_64-4.9.2-posix-seh-rt_v3-rev1/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible D:oostlib/libboost_program_options-mgw34-mt-d-1_59.a when searching for -lboost_program_options-mgw34-mt-d-1_59
    D:/mingw-w64/mingw-w64/x86_64-4.9.2-posix-seh-rt_v3-rev1/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.2/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lboost_program_options-mgw34-mt-d-1_59
    collect2.exe: error: ld returned 1 exit status

    问题出自64位编译器链接32位库
    32位编译器编译出来的是 libboost_program_options-mgw34-mt-d-1_59.a,而64位编译器编译出来的是libboost_program_options-mgw49-mt-d-1_59.a

  • 相关阅读:
    git错误操作导致代码丢失找回
    org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题
    WebMvcConfigurerAdapter在Spring boot2.x已废弃
    AJAX实现模拟注册跳转
    遍历字符串替换实例
    spring boot2.x依赖
    Thymeleaf页面添加th:value后报错原因
    thymeleaf中th:href字符拼接
    刁肥宅数据结构课设“布隆过滤器的实现和应用”源代码(v1.0,永不上交)
    数据结构实验1:C++实现静态顺序表类
  • 原文地址:https://www.cnblogs.com/wacc/p/5019176.html
Copyright © 2011-2022 走看看