Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Missing extern "C" in smpi_helpers.h.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 18 Jun 2018 15:16:46 +0000 (17:16 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 18 Jun 2018 19:40:02 +0000 (21:40 +0200)
include/smpi/smpi_helpers.h
src/smpi/smpicxx.in

index 58963b9..3a87fde 100644 (file)
 #include <time.h>
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 int smpi_usleep(useconds_t usecs);
 #if _POSIX_TIMERS > 0
 int smpi_nanosleep(const struct timespec* tp, struct timespec* t);
@@ -36,4 +40,7 @@ int smpi_getopt (int argc,  char *const *argv,  const char *options);
 #define getopt_long(x,y,z,a,b) smpi_getopt_long(x,y,z,a,b)
 #define getopt_long_only(x,y,z,a,b) smpi_getopt_long_only(x,y,z,a,b)
 
+#ifdef __cplusplus
+} // extern "C"
+#endif
 #endif
index 0af62a7..1e6b88d 100755 (executable)
@@ -19,7 +19,7 @@ CMAKE_LINKARGS="-L@libdir@"
 list_set CXXFLAGS "-std=gnu++11"
 list_set LINKARGS "-std=gnu++11"
 if [ "@WIN32@" != "1" ]; then
-    # list_add CXXFLAGS "-Dmain=smpi_simulated_main_"
+    # list_add CXXFLAGS "-include" "@includedir@/smpi/smpi_helpers.h"
     list_add CXXFLAGS "-fpic"
     if [ "x${SMPI_PRETEND_CC}" = "x" ]; then
        list_add LINKARGS "-shared"