Skip to content

Commit

Permalink
setup to compile on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ebertolazzi committed Feb 12, 2023
1 parent 794a39c commit 115faa6
Show file tree
Hide file tree
Showing 17 changed files with 124 additions and 10 deletions.
4 changes: 2 additions & 2 deletions toolbox/lib/CompileClothoidsLib.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
%DEFS = '-DG2LIB_DEBUG ';
DEFS = ' ';

CMDBASE = [ 'mex -c -largeArrayDims -Isrc -Isrc/Utils ', DEFS];
CMDBASE = [ 'mex -largeArrayDims -Isrc -Isrc/Utils ', DEFS];
if isunix
CMDBASE = [CMDBASE, 'CXXFLAGS="\$CXXFLAGS -Wall -O2 -g" '];
elseif ispc
Expand Down Expand Up @@ -76,7 +76,7 @@
' LINKLIBS="-ldl -L\$MATLABROOT/bin/\$ARCH -L\$MATLABROOT/extern/bin/\$ARCH -lMatlabDataArray -lmx -lmex -lmat -lm "' ...
];
elseif ispc
CMD = [CMD, 'COMPFLAGS="\$COMPFLAGS -O2" '];
CMD = [CMD, 'COMPFLAGS="\$COMPFLAGS /O2" '];
end

disp(CMD);
Expand Down
6 changes: 6 additions & 0 deletions toolbox/src/Clothoid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ namespace G2lib {
m_aabb_done = false;
}

real_type
ClothoidCurve::length_ISO( real_type ) const {
UTILS_ERROR0( "Offset length not available for Clothoids\n" );
return 0;
}

// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

void
Expand Down
5 changes: 1 addition & 4 deletions toolbox/src/Clothoids/Clothoid.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -693,10 +693,7 @@ namespace G2lib {
{ return m_L; }

real_type
length_ISO( real_type ) const override {
UTILS_ERROR0( "Offset length not available for Clothoids\n" );
return 0;
}
length_ISO( real_type ) const override;

real_type theta_begin() const override { return m_CD.m_theta0; }
real_type kappa_begin() const override { return m_CD.m_kappa0; }
Expand Down
5 changes: 1 addition & 4 deletions toolbox/src/Clothoids/PolyLine.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,7 @@ namespace G2lib {
{ return m_s0.back(); }

real_type
length_ISO( real_type ) const override {
UTILS_ERROR0( "PolyLine::length( offs ) not available!\n" );
return 0;
}
length_ISO( real_type ) const override;

real_type
x_begin() const override
Expand Down
6 changes: 6 additions & 0 deletions toolbox/src/PolyLine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ namespace G2lib {
this->push_back( PL, tol );
}

real_type
PolyLine::length_ISO( real_type ) const {
UTILS_ERROR0( "PolyLine::length( offs ) not available!\n" );
return 0;
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

int_type
Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_BiarcListMexWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#pragma GCC diagnostic ignored "-Wexit-time-destructors"
#endif

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#include "Clothoids.hh"
#include "Utils_mex.hh"
#include "mex_info.hxx"
Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_BiarcMexWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#pragma GCC diagnostic ignored "-Wexit-time-destructors"
#endif

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#include "Clothoids.hh"
#include "Utils_mex.hh"
#include "mex_info.hxx"
Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_CircleArcMexWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#pragma GCC diagnostic ignored "-Wexit-time-destructors"
#endif

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#include "Clothoids.hh"
#include "Utils_mex.hh"
#include "mex_info.hxx"
Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_ClothoidCurveMexWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#pragma GCC diagnostic ignored "-Wexit-time-destructors"
#endif

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#include "Clothoids.hh"
#include "Utils_mex.hh"
#include "mex_info.hxx"
Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_ClothoidListMexWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#pragma GCC diagnostic ignored "-Wexit-time-destructors"
#endif

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#include "Clothoids.hh"
#include "Utils_mex.hh"
#include "mex_info.hxx"
Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_ClothoidSplineG2MexWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#pragma GCC diagnostic ignored "-Wexit-time-destructors"
#endif

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#include "Clothoids.hh"
#include "Utils_mex.hh"
#include "mex_info.hxx"
Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_FresnelCS.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
#include "Clothoids.hh"
#include "Utils_mex.hh"

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#define MEX_ERROR_MESSAGE \
"======================================================================\n" \
"\n" \
Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_LineSegmentMexWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#pragma GCC diagnostic ignored "-Wexit-time-destructors"
#endif

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#include "Clothoids.hh"
#include "Utils_mex.hh"
#include "mex_info.hxx"
Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_PolyLineMexWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#pragma GCC diagnostic ignored "-Wexit-time-destructors"
#endif

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#include "Clothoids.hh"
#include "Utils_mex.hh"
#include "mex_info.hxx"
Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_TriTriOverlap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#pragma GCC diagnostic ignored "-Wexit-time-destructors"
#endif

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#include "Clothoids.hh"
#include "Utils_mex.hh"

Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_Triangle2DMexWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#pragma GCC diagnostic ignored "-Wexit-time-destructors"
#endif

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#include "Clothoids.hh"
#include "Utils_mex.hh"
#include "mex_info.hxx"
Expand Down
9 changes: 9 additions & 0 deletions toolbox/src_mex/mex_XY_to_angle.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
#pragma GCC diagnostic ignored "-Wexit-time-destructors"
#endif

#ifdef _MSC_VER
#pragma comment(lib, "IPHLPAPI.lib")
#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "Shlwapi.lib")
#pragma comment(lib, "Advapi32.lib")
#pragma comment(lib, "Shell32.lib")
#pragma comment(lib, "kernel32.lib")
#endif

#include "Clothoids.hh"
#include "Utils_mex.hh"

Expand Down

0 comments on commit 115faa6

Please sign in to comment.