jshowacre / dynamic-cpp Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/dynamic-cpp
License: MIT License
Automatically exported from code.google.com/p/dynamic-cpp
License: MIT License
What steps will reproduce the problem?
1. yum install boost-devel
2. my boost version is 1.54
3. No idea how to compile with boost error below
What is the expected output? What do you see instead?
When i changed to /usr/lib64, i get the error like this:
CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:651 (file):
file STRINGS file "/usr/lib64/boost/version.hpp" cannot be read.
Call Stack (most recent call first):
CMakeLists.txt:38 (find_package)
CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1138 (message):
Unable to find the requested Boost libraries.
Boost version: 0.0.0
Boost include path: /usr/lib64
What version of the product are you using? On what operating system?
CentOS 6.6, the latest dynamic cpp
CMake Error at /usr/share/cmake/Modules/FindBoost.cmake:1138 (message):
Unable to find the requested Boost libraries.
Boost version: 1.54.0
Boost include path: /usr/include
Could not find the following static Boost libraries:
boost_unit_test_framework
pls help. thanks
Original issue reported on code.google.com by [email protected]
on 9 Dec 2014 at 5:59
The _message member variable of the exception class is a const char*. The
constructor of the exception does the following.
_message = message;
The problem is that exceptions are thrown. This goes the exception to go beyond
the context of the calling function.
This will work as long as the exception is used as follows.
throw exception("some quoted string.");
It works by chance because "some quoted string." is treated as a pointer to
some fixed place in the final executable.
However, this will cause problems.
char message[1024];
/* code to format that message */
throw exception(message);
By the time what gets called, the _message member variable no longer points to
valid data.
This is why std::exception copies the message, and does not just use =.
Here is the implementation from Visual Studio.
_EXCEPTION_INLINE __CLR_OR_THIS_CALL exception::exception(
const char * const & _What)
: _Mywhat(NULL), _Mydofree(false)
{
_Copy_str(_What);
}
_Copy_str uses malloc and strcpy.
Here is the source of _Copy_str.
// _Copy_str() assumes that *this is already tidy.
_EXCEPTION_INLINE void __CLR_OR_THIS_CALL exception::_Copy_str(
const char * _What)
{
if (_What != NULL)
{
const size_t _Buf_size = strlen(_What) + 1;
_Mywhat = static_cast<char *>(malloc(_Buf_size));
if (_Mywhat != NULL)
{
_CRT_SECURE_STRCPY(const_cast<char *>(_Mywhat), _Buf_size, _What);
_Mydofree = true;
}
}
}
Original issue reported on code.google.com by [email protected]
on 28 Jun 2014 at 10:35
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.