Skip to content

Commit 84f7f1d

Browse files
authored
Merge pull request #1280 from MRPT/fix/cs-external-linking
Fix C linkage build error in CSparse
2 parents a57e0f3 + afda967 commit 84f7f1d

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

doc/source/doxygen-docs/changelog.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
\page changelog Change Log
22

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

67
# Version 2.10.1: Released August 10th, 2023
78
- Build system:

libs/math/include/mrpt/math/CSparseMatrix.h

+3-7
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,14 @@
1919
#include <stdexcept>
2020

2121
// Include CSparse lib headers, either from the system or embedded:
22-
extern "C"
23-
{
2422
#if MRPT_HAS_SUITESPARSE
25-
#define NCOMPLEX // In MRPT we don't need complex numbers, so avoid the
26-
// annoying warning: 'cs_ci_house' has C-linkage specified,
27-
// but returns UDT 'std::complex<double>' which is
28-
// incompatible with C
2923
#include "cs.h"
3024
#else
25+
extern "C"
26+
{
3127
#include <mrpt/3rdparty/CSparse/cs.h>
32-
#endif
3328
}
29+
#endif
3430

3531
namespace mrpt::math
3632
{

0 commit comments

Comments
 (0)