Author Topic: the command g++ is not known... trying to install boost  (Read 5856 times)

Offline WeakPeak

  • Multiple posting newcomer
  • *
  • Posts: 13
the command g++ is not known... trying to install boost
« on: January 14, 2011, 10:54:20 pm »
Hello i was trying to install boost  (1.45) with a embeded MinGW/gcc Code::Blocks 10.05 version on a windows xp pro sp3 system.

i was trying this http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef wikki entry for installing boost

i changed the commands and variable to propper path and versions...

but on the point where i do this line :

Quote
bjam --toolset=gcc "--prefix=<installpath>" install

i get
>> The command g++ is not known...
as output

the result is that all header files and the include folder exists
also the lib folder exists but it is empty

can someone help me out here?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
« Last Edit: January 15, 2011, 12:15:38 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline WeakPeak

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: the command g++ is not known... trying to install boost
« Reply #2 on: January 15, 2011, 12:51:27 am »
well irrlicht projects works fine with code blocks when compiling, building, running, debugging inside code blocks

but i recognized the envoirement path for MinGw is (was) not set

so i did the following:

Code
set PATH=C:\Programme\CodeBlocks\MinGW\bin;%PATH%

in commandline

than


Quote
set PATH=C:\boost\boost-jam-3.1.18-1-ntx86;%PATH%

for the propper path and version of jam

i also executed the
Code
bootstrap.bat
in commandline


than i did

Code
bjam --toolset=gcc "--prefix=C:\Programme\CodeBlocks" install

in commandline (all on C:\boost\boost_1_45_0 where i formerly unpacked the 7z )

now inside code blocks

in a new project i linked only the search dircetory in the build options because with the description in the link on the wikki boost will not be found on windows

anyway...

the two examples where linked in the wikki are also posix examples

Code
#include <./boost/filesystem.hpp>

//include for std::cout
#include <iostream>


namespace bfs=boost::filesystem;
int main()
{
bfs::path p("first.cpp");
if(bfs::exists(p))
std::cout << "exists";
}

will endup in the errorcode hpp file at line 214 :)

so boost is installed now propperly and linked aswell just the usage doesent work but i gues thats my fault need to have a closer look at boost :)




Offline WeakPeak

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: the command g++ is not known... trying to install boost
« Reply #3 on: January 15, 2011, 09:29:44 am »
ok now it works

i just needed to link the librarys propperly (the wikki also says something different)

and needed to link a few dependencys