I've installed MinGW-w64 i686-4.9.2-posix-dwarf-rt_v3-rev0 and x86_64-4.9.2-posix-seh-rt_v3-rev0 on Windows.
I figured out there is a C:\mingw-w64\i686-4.9.2-posix-dwarf-rt_v3-rev0\mingw32\include and a C:\mingw-w64\i686-4.9.2-posix-dwarf-rt_v3-rev0\mingw32\i686-w64-mingw32\include, with different header files. The same goes for the lib-directory.
Which one of the two paths to tell to the IDE? Why doesn't drop the installer all the header-files in one include directory and all the lib-files in one directory?
Best Regards,
RoestVrijStaal
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, this is indeed odd, but "forced" on every GCC installation. In general you'll need both. You can see the compiler's search paths by invoking the compiler with the additional -v flag, and looking for #include <...> search starts here: bit.
Any decent IDE should figure these out automagically by querying the compiler (as shown above), and you shouldn't need to add them explicitly. Those fields are for additional, 3rd party libraries installed in nonstandard locations.
What IDE are you using that requires this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Don't worry, before posting this topic I had already everything up and running for weeks.
But today I was like "Ok, everything runs fine as long as I add all the include and lib directories I could find, but why?"
I'm using Code::Blocks.
Not the best IDE in terms of functionality and support, but unfortunately the FOSS IDE with the most out-of-the-box-support for 3rd party libraries.
(At least, it's "New Project"-Wizard plugin makes it easier to get started, while adding a 3rd party library -to for example NetBeans or Eclipse- gives more headaches).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, yeah, IDEs are a thing of many opinions and words.
I can suggest Qt Creator, which works great if you just use qmake (even for non-Qt stuff), or quite well if you know your way around CMake (you'll need to write the CMake file yourself, which isn't very hard really). It has pretty great support for C++, especially compared to other IDEs, and is quite light and zippy. It also has git/svn/mercurial/... and gdb/cdb/valgrind/... integration, which is a definite plus. It also doesn't need you to tell it where the compiler finds its header/library files.
I can also suggest MSYS2, which is the new MSYS and comes with a complete package management system, so you can install 100s of 3rd party libraries and you have no worries about plugging them into your project (or building them), as the compiler will just find them if installed through MSYS2 pacman.
Just some personal suggestions ;-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Qt Creator also supports Qbs (the Qt Build Suite) which is nicely integrated into Qt Creator (even better in 3.3.0 which should be released any day now) and is IMHO much better than qmake and also better than CMake. You get it automatically with MSYS2's mingw-w64-{i686,x86_64}-qt-creator packages.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I've installed MinGW-w64 i686-4.9.2-posix-dwarf-rt_v3-rev0 and x86_64-4.9.2-posix-seh-rt_v3-rev0 on Windows.
I figured out there is a C:\mingw-w64\i686-4.9.2-posix-dwarf-rt_v3-rev0\mingw32\include and a C:\mingw-w64\i686-4.9.2-posix-dwarf-rt_v3-rev0\mingw32\i686-w64-mingw32\include, with different header files. The same goes for the lib-directory.
Which one of the two paths to tell to the IDE? Why doesn't drop the installer all the header-files in one include directory and all the lib-files in one directory?
Best Regards,
RoestVrijStaal
Yes, this is indeed odd, but "forced" on every GCC installation. In general you'll need both. You can see the compiler's search paths by invoking the compiler with the additional
-v
flag, and looking for#include <...> search starts here:
bit.Any decent IDE should figure these out automagically by querying the compiler (as shown above), and you shouldn't need to add them explicitly. Those fields are for additional, 3rd party libraries installed in nonstandard locations.
What IDE are you using that requires this?
Don't worry, before posting this topic I had already everything up and running for weeks.
But today I was like "Ok, everything runs fine as long as I add all the include and lib directories I could find, but why?"
I'm using Code::Blocks.
Not the best IDE in terms of functionality and support, but unfortunately the FOSS IDE with the most out-of-the-box-support for 3rd party libraries.
(At least, it's "New Project"-Wizard plugin makes it easier to get started, while adding a 3rd party library -to for example NetBeans or Eclipse- gives more headaches).
Well, yeah, IDEs are a thing of many opinions and words.
I can suggest Qt Creator, which works great if you just use qmake (even for non-Qt stuff), or quite well if you know your way around CMake (you'll need to write the CMake file yourself, which isn't very hard really). It has pretty great support for C++, especially compared to other IDEs, and is quite light and zippy. It also has git/svn/mercurial/... and gdb/cdb/valgrind/... integration, which is a definite plus. It also doesn't need you to tell it where the compiler finds its header/library files.
I can also suggest MSYS2, which is the new MSYS and comes with a complete package management system, so you can install 100s of 3rd party libraries and you have no worries about plugging them into your project (or building them), as the compiler will just find them if installed through MSYS2 pacman.
Just some personal suggestions ;-)
Qt Creator also supports Qbs (the Qt Build Suite) which is nicely integrated into Qt Creator (even better in 3.3.0 which should be released any day now) and is IMHO much better than qmake and also better than CMake. You get it automatically with MSYS2's mingw-w64-{i686,x86_64}-qt-creator packages.