]> Creatis software - gdcm.git/blobdiff - Testing/dynmodule.cxx
ENH: Adding an exe that seg fault on AMD64/gcc.
[gdcm.git] / Testing / dynmodule.cxx
diff --git a/Testing/dynmodule.cxx b/Testing/dynmodule.cxx
new file mode 100644 (file)
index 0000000..2c9a664
--- /dev/null
@@ -0,0 +1,39 @@
+/*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: dynmodule.cxx,v $
+  Language:  C++
+  Date:      $Date: 2005/09/19 18:54:10 $
+  Version:   $Revision: 1.1 $
+                                                                                
+  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+  l'Image). All rights reserved. See Doc/License.txt or
+  http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+                                                                                
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+                                                                                
+=========================================================================*/
+
+#include "gdcmFile.h"
+
+#ifdef _WIN32
+#  define __ELX_DLLEXPORT __declspec(dllexport)
+#else
+#  define __ELX_DLLEXPORT
+#endif
+
+extern "C" __ELX_DLLEXPORT void afunc(void)
+{
+  std::cerr << "Hello, we are in the dll-function afunc!" << std::endl;
+
+  // Create an instance of a gdcm class. This makes sure
+  // that the problematic gdcm-library is linked.
+  gdcm::File *file = new gdcm::File();
+  
+  std::cerr << "End of function afunc"  << std::endl; 
+  
+}
+
+