简体   繁体   English

Coocox Coide编译器错误:字符串索引超出范围:-1

[英]Coocox Coide Compiler error : String index out of range: -1

I'm having problems with my project, I'm trying to build it and coocox coide gives me this error. 我的项目遇到问题,我正在尝试构建它,而coocox coide给了我这个错误。


Building has encountered an error 建筑物遇到错误

an internal error occured during building: 构建期间发生内部错误:

An internal error occurred during: "Building". 在“构建”期间发生内部错误。 String index out of range: -1 字符串索引超出范围:-1


It doesn't say where it happened or what triggered it ... 它没有说它发生在哪里或什么触发了它...

I looked all over and I can't find an answer for it, at least not for my situation. 我四处张望,找不到答案,至少不是针对我的情况。

Does anyone know how to fix this ? 有谁知道如何解决这一问题 ? I could realy use help with this :/ 我真的可以在此使用帮助:/

I'm using: 我正在使用:

CooCox CoIDE CooCox CoIDE

Version: 1.7.7 Build id: 20140628-3328-1557 版本:1.7.7内部版本号:20140628-3328-1557

I also used CubeMx to generate my project, then manually inserted it into Coide. 我还使用CubeMx生成了我的项目,然后将其手动插入到Coide中。

you can download my project from here if that helps 您可以从这里下载我的项目,如果有帮助

https://1drv.ms/u/s!Ao4Ba524gyr6eDpD1FP6UonCjVo https://1drv.ms/u/s!Ao4Ba524gyr6eDpD1FP6UonCjVo

Thanks in advance! 提前致谢!

I have various built files open. 我打开了各种内置文件。 I think it has sometimes problems to erase them. 我认为有时擦除它们会遇到问题。 Even with the rebuild button, it (sometimes) gives an error at first (no popup window though)"something like: cannot delete files" and the second time I try it works. 即使使用了“重建”按钮,它(有时)仍会在开始时出现错误(尽管没有弹出窗口)“类似:无法删除文件”,而第二次尝试使用它。 Maybe the build files that are erased need some time after they are deleted to be recognized by coide as deleted, and it returns an error if not done fast enough?! 也许删除的构建文件在删除后需要一段时间才能被coide识别为已删除,如果执行得不够快,它会返回错误? Well, also with the build button, sometimes pressing a second time works! 好吧,也可以使用“构建”按钮,有时再按一次即可!

Hmm but it is not reliable... this is a work in progress. 嗯,但是不可靠...这是一项正在进行的工作。

follow up: 跟进:

  • If there was a compile error, the build button works when building the next time. 如果出现编译错误,则下次构建时,构建按钮将起作用。

  • If there was a link error, the build button doesn't work for the next compilation. 如果存在链接错误,则“构建”按钮不适用于下一次编译。

-interesting link with similar problem: http://www.coocox.org/forum/viewtopic.php?f=2&t=4145&start=15 (unfortunatly does not solve my issue) -具有类似问题的有趣链接: http : //www.coocox.org/forum/viewtopic.php? f=2&t=4145&start =15 (不幸的是,它不能解决我的问题)

I faced the same problem when I tried to build with a custom scatter file for the linker. 当我尝试使用链接器的自定义分散文件进行构建时,我遇到了相同的问题。

The link @lode provided solved the issue for me: 提供的@lode链接为我解决了这个问题:

I had to remove every occurence of the string rom from the comments inside the .ld file. 我不得不删除该字符串的每一次出现rom由内而外的意见.ld文件。 I replaced the word from with fr_om and voilà, issue resolved. 我用fr_omfr_om代替了from一词,问题已解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM