Skip to content

Commit

Permalink
Merge pull request #1280 from MRPT/fix/cs-external-linking
Browse files Browse the repository at this point in the history
Fix C linkage build error in CSparse
  • Loading branch information
jlblancoc authored Aug 10, 2023
2 parents a57e0f3 + afda967 commit 84f7f1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 2 additions & 1 deletion doc/source/doxygen-docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
\page changelog Change Log

# Version 2.10.2: UNRELEASED
(No changes yet)
- BUG FIXES:
- Fix CSparse "C" linkage build error (OSX Clang)

# Version 2.10.1: Released August 10th, 2023
- Build system:
Expand Down
10 changes: 3 additions & 7 deletions libs/math/include/mrpt/math/CSparseMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,14 @@
#include <stdexcept>

// Include CSparse lib headers, either from the system or embedded:
extern "C"
{
#if MRPT_HAS_SUITESPARSE
#define NCOMPLEX // In MRPT we don't need complex numbers, so avoid the
// annoying warning: 'cs_ci_house' has C-linkage specified,
// but returns UDT 'std::complex<double>' which is
// incompatible with C
#include "cs.h"
#else
extern "C"
{
#include <mrpt/3rdparty/CSparse/cs.h>
#endif
}
#endif

namespace mrpt::math
{
Expand Down

0 comments on commit 84f7f1d

Please sign in to comment.