First install Code::Blocks using the Windows/binary version of the installer, the one with MinGW included. For me this resulted in a functional installation the IDE, but it threw the following error whenever I hit F9 to build and run.
"MyProject - Debug" uses an invalid compiler. Skipping...
MinGW was not missing, but Code::Blocks doesn't yet know where it is (even though it was the Code::Blocks installer that set it up in the first place!). Here's the fix:
goto the 'Settings' menu
click 'Compiler and debugger...'
click 'Global compiler settings' in the column of icons on the left side
click the 'Toolchain executables' tab
note that the path to "Compiler's installation directory" is 'C:\MinGW' (at least for me it was)
click the 'Auto-detect' button next to that input
Hopefully that will succeed in finding your MinGW installation directory for you. It was when I did it. That was enough to allow me to build and run a console application, the default "Hello World!" that the IDE provides whenever you create a new console application project.
Next, I closed that project and opened up my openGL/GLUT project. This is the one for which I'd been setting up Code::Blocks in the first place. Hitting F9 still didn't result in a happily running GLUT window like Code::Blocks had been giving me on my Linux machine. The next problem?
ld.exe cannot find -lGL
=== Build finished: 1 errors, 0 warnings ==
This error I'd already seen, just one night before on my Linux machine. The solution to that problem can be found in my previous post, "cannot find -lGL". That's all I can take tonight, I'll have to continue this unnecessary torment tomorrow.
No comments:
Post a Comment