User forums > General (but related to Code::Blocks)
Manipulating the Compile Button, MinGW-W64 oddities
sodev:
Im always amazed how people cant get things right in years but yet figure out how to do it in the most amazing ways wrong. And you top that by requesting a change in an IDE to support your totally bullshit approach ;D.
Well, where do i start? Dont put anything into your MinGW installation folder, especially not your projects!
Why doesn't MinGW find your headers and libraries? Because you didnt tell it where to look for them! You arent on linux where you can put this stuff into /usr/local/include and /usr/local/lib and it works, coding on windows is more difficult to prevent idiots to code even more useless crap :).
Why does it work in your projects folder? Because you turn it into your working directory by switching into it before compiling, and the working directory is the only one where MinGW searches for headers and libs by default!
So how to solve this problem? Use this wonderful -I switch to specify where to look for your headers. Use the amazing -L switch to specify where to look for your libraries. And since you are not using MSVC which supports autolinking you cant be saved from using tiny -l switches to specify which libs to link against.
And before you ask how to hack this into the compile button ... just set these paths in the proper locations in CodeBlocks!
Navigation
[0] Message Index
[*] Previous page
Go to full version