Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: headkase on May 30, 2018, 03:51:04 pm

Title: Nassi-Shneiderman global variable "boost" not enough to find includes [Solved]
Post by: headkase on May 30, 2018, 03:51:04 pm
I've built SVN 11414 with the Nassi-Shneiderman contributed plugin.

Of course it depends on boost so I've set that up too.  However, setting the global variable defined in the plugin project boost's base directory isn't enough for the plugin to find it's includes.  I have to put the boost base directory into the compiler search directories as well for the plugin to successfully compile.  Am I doing something wrong?

The project used is SVN 11414 64-bit with wx 3.1.1.  All compiled from source with MinGW-Builds 7.3.0 64-bit.

Thanks,
Bill.

Title: Re: Nassi-Shneiderman global variable "boost" not enough to find includes
Post by: stahta01 on May 30, 2018, 03:56:58 pm
No, that is what I do.
Title: Re: Nassi-Shneiderman global variable "boost" not enough to find includes
Post by: headkase on May 30, 2018, 04:20:19 pm
No, that is what I do.

Manually setting an include path doesn't seem like it's the right thing.  Would it be better to modify that plugin's project so the extra include is unnecessary?
Title: Re: Nassi-Shneiderman global variable "boost" not enough to find includes
Post by: Miguel Gimenez on May 30, 2018, 04:25:28 pm
There is no need to modify search directories, just set also the include and lib fields. Your locations may be different.
Title: Re: Nassi-Shneiderman global variable "boost" not enough to find includes
Post by: headkase on May 30, 2018, 04:29:00 pm
There is no need to modify search directories, just set also the include and lib fields. Your locations may be different.

Okay, thanks.  I've done that and now I'll go rebuild just to make sure that it works on my end.
Title: Re: Nassi-Shneiderman global variable "boost" not enough to find includes
Post by: headkase on May 30, 2018, 04:48:58 pm
There is no need to modify search directories, just set also the include and lib fields. Your locations may be different.

Yes, you're right.  I've updated my notes and the information will eventually be in the wiki.
Title: Re: Nassi-Shneiderman global variable "boost" not enough to find includes [Solved]
Post by: sodev on May 30, 2018, 08:23:59 pm
If you don't set the include part of the global variable it defaults to "include", which in this case is wrong because the include path needs to be the base directory. Same applies to lib (and maybe the other standard ones as well) ;)

An imho better approach to set the include part is to reference the global variable itself so u have to set the path only once, in this case $(#boost)
Title: Re: Nassi-Shneiderman global variable "boost" not enough to find includes [Solved]
Post by: headkase on May 30, 2018, 11:40:29 pm
If you don't set the include part of the global variable it defaults to "include", which in this case is wrong because the include path needs to be the base directory. Same applies to lib (and maybe the other standard ones as well) ;)

This makes sense and once you point it out it is a logical behaviour.

An imho better approach to set the include part is to reference the global variable itself so u have to set the path only once, in this case $(#boost)

If that can be done in the plugin project settings it would simplify the global variable but might be less clear what behaviour you're getting out of it given what you previously said.

Thanks.
Title: Re: Nassi-Shneiderman global variable "boost" not enough to find includes [Solved]
Post by: sodev on May 31, 2018, 01:54:57 pm
Maybe this picture explains better what i mean :)
Title: Re: Nassi-Shneiderman global variable "boost" not enough to find includes [Solved]
Post by: Miguel Gimenez on May 31, 2018, 02:05:41 pm
Sodev, you can already do that
Title: Re: Nassi-Shneiderman global variable "boost" not enough to find includes [Solved]
Post by: sodev on May 31, 2018, 03:41:10 pm
Yes i know, i just wanted to clarify my previous post, i had the impression it got misunderstood.
Title: Re: Nassi-Shneiderman global variable "boost" not enough to find includes [Solved]
Post by: headkase on May 31, 2018, 11:35:44 pm
Yes i know, i just wanted to clarify my previous post, i had the impression it got misunderstood.

It did get misunderstood, updating notes again.  ;) Thanks.