Code Blocks 13.12 build errors: wrong include paths

只愿长相守 提交于 2019-12-25 06:55:59

问题


I'm just starting up with code::blocks using 13.12 and am attempting the simple "Hello, World" WxSmith tutorial at wiki.codeblocks.org, but I can't get the resource compiler to complete without errors. I've not made hardly any changes to what the new project wizard created for me. Here's the build log:

windres.exe -I"C:\WxWidgets 3.0.0\include" -I"C:\WxWidgets 3.0.0\lib\gcc_dll\mswud" -J rc -O coff -i C:\Users\John\DOCUME~1\CODEBL~1\TUTORI~1\resource.rc -o obj\Debug\resource.res gcc: error: 3.0.0\include: No such file or directory gcc: error: 3.0.0\lib\gcc_dll\mswud: No such file or directory windres.exe: preprocessing failed. Process terminated with status 1 (0 minute(s), 4 second(s)) 3 error(s), 0 warning(s) (0 minute(s), 4 second(s))

I don't see nor understand why the gcc: error:(s) are occuring. Where/How is this looking for "3.0.0..." as opposed to "WxWidgets 3.0.0..." as specified in the command line? Could this be a problem with the directory having a space in it?

Thanks in advance, Jay


回答1:


If your directories have spaces in their name, use them between double quotes, like in:

"C:\WxWidgets 3.0.0\lib\gcc_dll\mswud"

However, maybe you are using the resource compiler without some required options. Try this command:

"C:\WxWidgets 3.0.0\bin\wx-config.exe" --rescomp

and see what output produces. then add any missing parameters to your original command.




回答2:


Solved, well sort of.

I did see a note for an older release of WxWidgets that stated to not use any directory with spaces embedded. So, I created another directory as "c:\WxWidgets_3.0.0" and wholesale copied everything from the old directory into it. Then, I deleted and recreated the tutorial project and in the new project wizard, specified the new directory. It compiled cleanly, although WxWidgets throws a bunch of warnings in compilation, but the result does run.



来源:https://stackoverflow.com/questions/21195297/code-blocks-13-12-build-errors-wrong-include-paths

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!