|
|
This thread is locked; no one can reply to it.
|
1
2
|
| Installing Boost, mainly for threads |
|
Speedo
Member #9,783
May 2008
|
23yrold3yrold said: Oh good Lord, I need to install the Boost:thread library, but I need to compile it with their compiler Boost Build, but that's a source distro <etc, etc> Oh good Lord, you didn't even bother reading the build instructions linked in the very first reply. If you had you'd probably have noticed a glowing linky with the text "download a pre-built bjam executable". |
|
23yrold3yrold
Member #1,134
March 2001
|
Yeah, that link takes me to a bunch of source distros. That's pretty much in line with my experience thus far. I found a bjam lib but every time I try to do anything with it, including pass it the help flag, it gives me "Unable to load Boost.Build: could not find "boost-build.jam"". boost-build.jam isn't with the binary, and it's nowhere in the Boost lib. I'm putting this one to bed for now I think ... -- |
|
SiegeLord
Member #7,827
October 2006
|
Have you tried this? That seems to contain an .exe file. But really... would it be hard of them to provide MinGW binaries? They are being very lazy, in my opinion. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
|
GullRaDriel
Member #3,861
September 2003
|
Axilmar said: Boost threads go a step beyond pthreads in many situations, thanks to object orientation and other nifty c++ tricks. Examples please ? That OOP thingy always make me laught, specially now. "Code is like shit - it only smells if it is not yours" |
|
Speedo
Member #9,783
May 2008
|
23yrold3yrold said: Yeah, that link takes me to a bunch of source distros. That's pretty much in line with my experience thus far. I found a bjam lib but every time I try to do anything with it, including pass it the help flag, it gives me "Unable to load Boost.Build: could not find "boost-build.jam"". boost-build.jam isn't with the binary, and it's nowhere in the Boost lib. I'm putting this one to bed for now I think ... Are you really even trying at this point? The link takes you to 4 prebult binaries (BSD, Linux, OSX, WinNT) and 2 source packages. boost-build.jam is in the root of the boost source, exactly where it tells you to invoke bjam from. |
|
axilmar
Member #1,204
April 2001
|
GullRaDriel said: Examples please ? That OOP thingy always make me laught, specially now. example 1: class Foo { public: void bar() { } }; int main() { thread t(bind(&Foo::bar, new Foo)); } example 2: mutex mtx; int main() { lock_guard<mutex> lock(mtx); } example 3: class Foo { int main() { shared_ptr<Foo> foo(new Foo); }
|
|
anonymous
Member #8025
November 2006
|
GullRaDriel said: That OOP thingy always make me laught, specially now. It is quite possible that you are mixing up OOP (in the sense of polymorphism, great design patterns etc) with simply having RAII objects that automate cleanups and such tasks simply by having their destructor automatically called. RAII is immensely useful even in perfectly procedural code. |
|
axilmar
Member #1,204
April 2001
|
anonymous said: It is quite possible that you are mixing up OOP (in the sense of polymorphism, great design patterns etc) with simply having RAII objects that automate cleanups and such tasks simply by having their destructor automatically called. RAII is immensely useful even in perfectly procedural code. No, not at all. Bind produces run-time polymorphic objects and scoped locks use compile-time polymorphic objects, plus RAII is a great design pattern helped by objects. |
|
anonymous
Member #8025
November 2006
|
Ok, but does that affect your programming style (except for making things more convenient |
|
BAF
Member #2,981
December 2002
|
Tobias Dammers said: I'm not sure about 2009, but AFAIK it still works the same. Your C# progra... 2009? There is no such thing as VS 2009. Assuming you mean 2008, then yes, it works the same. |
|
axilmar
Member #1,204
April 2001
|
anonymous said:
Ok, but does that affect your programming style (except for making things more convenient It depends on the code. |
|
Tobias Dammers
Member #2,604
August 2002
|
Quote: 2009?
Typo. anonymous said: If I write procedural code that uses char* for strings and I write the same code except using std::string (and worrying less about certain things), does that turn the design of my program into OOP? No. For your design to be OOP, it needs to follow the principles of OO design. For starters, read this. --- |
|
anonymous
Member #8025
November 2006
|
Good. My point was that claims like "sometimes OOP is good, sometimes procedural is better" can't mean that "when procedural is better, you shouldn't use any objects like std::string or boost threads". |
|
|
1
2
|