Guys, I have mention this previously, but I would like to expand little on the topic of compiler settings which can be set from two different places:
a) Settings/Compiler
b) Project/Build Options
I personally really find it very, very confusing. On top of that I believe that there is a bug, unless (and this is very possible) I do not fully understand its workings.
OK, I've installed successfully boost library.
1. I've set new global variable:
see attachment "global_var.png"
2. I've set in Settings/Compiler Settings on the Search Directories tab, on the Compiler tab: $(#boost.include) and on the linker tab $(#boost.lib)
3. On tab called Linker Settings (the one before Search Directories) I've provided path for the test library
see attachment "Linker Settings.png"
I've tried to run simple test case:
#define BOOST_TEST_MODULE MyTest
#include <boost/test/unit_test.hpp>
BOOST_AUTO_TEST_CASE(MyTest)
{
// To simplify this example test, let's suppose we'll test 'float'.
// Some test are stupid, but all should pass.
float x = 9.5f;
BOOST_CHECK(x != 0.0f);
BOOST_CHECK_EQUAL((int)x, 9);
BOOST_CHECK_CLOSE(x, 9.5f, 0.0001f); // Checks differ no more then 0.0001%
}
I'm getting error:
C:\...\Test.cpp|2|fatal error: boost/test/unit_test.hpp: No such file or directory|
This is already confusing because I've specified the path in tab Search Directories (point no. 2). Anyway, it seems like I have to specify it second time in: Project/Build Options, so I did it, but here simply adding $(#boost.include) doesn't work. It must be just $(#boost). Why:
a) do I have to specify it second time
b) the "include" part must be omitted?
OK, now it finds this directory, but here I'm running into new problem:
undefined reference to `cpp_main(int, char**)
I knew that this is something to do with library not being found (even though I've set all libraries, see point no.3). So what I have to do? In order for this to work I need to provide this path second time in: Project/Build Options on the Linker Settings tab. Why? I've already provided this path once.
So the issues in a nutshell I see:
a) There seem to be need to set identical settings for linker and compiler in two places, via Settings/Compiler and Project/Build Option
b) Settings those options just via Settings/Compiler seems not working, and I believe those settings are global settings, and unless those are overwritten by settings specified in Project/Build Options, the global settings should be used. But they are not used.
I strongly believe that the current situation is at best problematic and confusing, and there are much better way to resolve the issue of having separate settings for different projects.
Regards
[attachment deleted by admin]