Fixes for Visual Studio

This commit is contained in:
Gerhard Kitzler 2015-01-23 10:14:42 +00:00
parent e286dadd38
commit 7f1cb899e5
3 changed files with 29 additions and 0 deletions

8
ng/main.cpp Normal file
View File

@ -0,0 +1,8 @@
#include <mydefs.hpp>
DLL_HEADER int NG_main(int argc, char ** argv);
int main(int argc, char ** argv)
{
return NG_main(argc, argv);
}

17
ng/netgenpy.cpp Normal file
View File

@ -0,0 +1,17 @@
#include <iostream>
#include <boost/python.hpp>
void __declspec(dllimport) ExportNetgenMeshing();
void __declspec(dllimport) ExportMeshVis();
void __declspec(dllimport) ExportCSG();
void __declspec(dllimport) ExportCSGVis();
void __declspec(dllimport) ExportGeom2d();
BOOST_PYTHON_MODULE(nglib)
{
ExportCSG();
ExportCSGVis();
ExportNetgenMeshing();
ExportMeshVis();
ExportGeom2d();
}

View File

@ -69,7 +69,11 @@ bool shellmode = false;
* *
*/ */
#ifdef WIN32
int DLL_HEADER NG_main(int argc, char ** argv)
#else
int main(int argc, char ** argv) int main(int argc, char ** argv)
#endif
{ {
#ifdef PARALLEL #ifdef PARALLEL