CodeBlocks : [highlight: No such directory found

纵然是瞬间 提交于 2021-01-29 05:43:07

问题


I have already read the other questions on the site and none of them matched with the issue I had.

I have already tried unistalling and then reinstalling codeblocks.

Please help.

Build Log :

mingw32-g++.exe -Wall -fexceptions -g -c S:\Coding\C++\aloo\main.cpp -o obj\Debug\main.o mingw32-g++.exe -o bin\Debug\aloo.exe obj\Debug\main.o

[highlight color=”yellow”]-lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32[/highlight] "C:\Program Files (x86)\CodeBlocks\MinGW\lib\libbgi.a"

mingw32-g++.exe: error: [highlight: No such file or directory

mingw32-g++.exe: error: color=”yellow”]-lbgi: No such file or directory

mingw32-g++.exe: error: C:\Program Files (x86)\CodeBlocks\MinGW\lib\libbgi.a: No such file or directory

Process terminated with status 1 (0 minute(s), 4 second(s))

3 error(s), 0 warning(s) (0 minute(s), 4 second(s))


回答1:


I have successfully solved the problem.

All I did was go to "Compiler Settings" ("Settings" -> "Compiler" -> Global compiler settings), and selected "Reset Defaults".

It solved the problem.

Thanks everyone for answering. :)




回答2:


Start by turning on full Compiler logging.

This is done by selecting the "Full command line" option Under menu "Settings" -> "Compiler" -> Global compiler settings -> [the compiler you use] -> "Other Setting" tab, "Compiler logging". In 12.11 and newer this is enabled by default.

This option will make Code::Blocks output the exact commands it uses to compile your code.

Things to remember:

  • Look at the "Build Log" NOT the "Build Message" tab
  • Do a re-build instead of build in order to get a full build log.
  • You should review all the commands and their options;
  • If you have compiled your app before, do a re-build (or clean before build) to see all compiling / linking steps;
  • If you don't know what an option or a command does please read the documentation for the compiler/linker you're using;
  • Look for missing commands;
  • For every source file (.cpp; .c; .d; etc) in your project, you must have at least one command in the log. This command must produce an object file (file extension .o if using gcc/g++ and .obj if using Visual Studio);
  • Every object file should be linked in the final executable, if not there are undefined symbols errors;
  • Remember the file extension matters: *.c is compiled as C file, *.cpp is compiled as C++ file.
  • If you have no luck, you can try to ask in the forum, but read first "How do I report a compilation problem on the forums"

From Code::Blocks FAQ



来源:https://stackoverflow.com/questions/38232149/codeblocks-highlight-no-such-directory-found

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