FAQ Database Discussion Community


Boost unit test link error — abi mismatch?

c++,unit-testing,boost,linker,abi
I'm trying to build a unit test with boost, but the linker complains about a missing function. Take this skeleton code #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MAIN #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_SUITE(TestFuncOps); BOOST_AUTO_TEST_CASE(CopyConstructor) { } BOOST_AUTO_TEST_SUITE_END(); But it fails with Undefined symbols for architecture x86_64: "boost::unit_test::ut_detail::normalize_test_case_name[abi:cxx11](boost::unit_test::basic_cstring<char const>)", referenced from:...

How to call Fortran routine with unit number argument from C

c,io,fortran,shared-libraries,abi
If I have a Fortran subroutine which takes a Fortran IO Unit as one of its parameters (for printing debug information to), and this function is compiled into a shared library, how do I correctly call this function from C? ! An example subroutine that I want to call from...

Why is declval present in a mangled symbol name?

c++,abi
I was playing around with GCC (4.9.2) abi::__cxa_demangle and I got to a case where it couldn't demangle a specific symbol name. That symbol is: _ZNK12DebugWrapperIR5TestClsE5getIdIIEEEDTcldtcl7declvalIS1_EEL_ZNKS0_5getIdEvEspfp_EEDpOT_ I'm surprise to see "declval" in there. That specific function is defined using this macro: template <typename WrappedType> class DebugWrapper { private: WrappedType VALUE;...

The alignement of a string

assembly,x86,abi
In a x86 stack an array of chars (string) finish when there is "string\0 + 4 NULLs", but: | e | l | l | o |esp | 0 | 0 | 0 | h | | 0 | 0 | 0 | 0 |esp+8 The array will be the...

Which implementations of the C programming language violate the following assumptions?

c,alignment,padding,abi
I'm trying to write a portable function that marshals binary formats into structures according to a formatting string not entirely unlike scanf. To do this, I make a couple of assumptions about the platform my code is running on: This structalign macro portably finds the alignment of a scalar type....

How to program in 16 bit protected mode with more than 64kb of data?

assembly,abi,protected-mode,80286
I want to write some code for the 16 bit protected mode, specifically a simple operating system with some programs. I know this sounds silly and it probably is, but I'm interested in understanding how to write programs under these constraints. I'd like to know what kinds of conventions have...