Build the demo version of the solver library as a DLL, not a static

library. If I understand correctly, that will avoid all the
compiler version issues with different required versions of libc.

[git-p4: depot-paths = "//depot/solvespace/": change = 2167]
solver
Jonathan Westhues 2010-07-10 10:53:30 -08:00
parent 46a7d0f719
commit 9ae29aa0e9
4 changed files with 23 additions and 14 deletions

View File

@ -29,11 +29,12 @@ all: $(OBJDIR)/ctest.exe
clean: clean:
rm -f obj/* rm -f obj/*
$(OBJDIR)/slvs.lib: $(SSOBJS) $(LIBOBJS) $(W32OBJS) $(OBJDIR)/slvs.dll: $(SSOBJS) $(LIBOBJS) $(W32OBJS)
@lib /OUT:$(OBJDIR)/slvs.lib $(SSOBJS) $(LIBOBJS) $(W32OBJS) @$(CC) /LD -Fe$(OBJDIR)/slvs.dll $(SSOBJS) $(LIBOBJS) $(W32OBJS) $(LIBS)
@echo slvs.lib @cp $(OBJDIR)/slvs.dll .
@echo slvs.dll
$(OBJDIR)/ctest.exe: example.c $(OBJDIR)/slvs.lib $(OBJDIR)/ctest.exe: example.c $(OBJDIR)/slvs.dll
@$(CC) $(CFLAGS) -Fe$(OBJDIR)/ctest.exe example.c $(OBJDIR)/slvs.lib $(LIBS) @$(CC) $(CFLAGS) -Fe$(OBJDIR)/ctest.exe example.c $(OBJDIR)/slvs.lib $(LIBS)
@echo ctest.exe @echo ctest.exe

View File

@ -1,4 +1,5 @@
#include "solvespace.h" #include "solvespace.h"
#define EXPORT_DLL
#include "slvs.h" #include "slvs.h"
Sketch SK; Sketch SK;

View File

@ -15,6 +15,12 @@
#ifndef __SLVS_H #ifndef __SLVS_H
#define __SLVS_H #define __SLVS_H
#ifdef EXPORT_DLL
#define DLL __declspec( dllexport )
#else
#define DLL __declspec( dllimport )
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -181,7 +187,7 @@ typedef struct {
int result; int result;
} Slvs_System; } Slvs_System;
void Slvs_Solve(Slvs_System *sys, Slvs_hGroup hg); DLL void Slvs_Solve(Slvs_System *sys, Slvs_hGroup hg);
// Our base coordinate system has basis vectors // Our base coordinate system has basis vectors
@ -190,17 +196,17 @@ void Slvs_Solve(Slvs_System *sys, Slvs_hGroup hg);
// basis vectors // basis vectors
// U V N // U V N
// which these functions compute from the quaternion. // which these functions compute from the quaternion.
void Slvs_QuaternionU(double qw, double qx, double qy, double qz, DLL void Slvs_QuaternionU(double qw, double qx, double qy, double qz,
double *x, double *y, double *z); double *x, double *y, double *z);
void Slvs_QuaternionV(double qw, double qx, double qy, double qz, DLL void Slvs_QuaternionV(double qw, double qx, double qy, double qz,
double *x, double *y, double *z); double *x, double *y, double *z);
void Slvs_QuaternionN(double qw, double qx, double qy, double qz, DLL void Slvs_QuaternionN(double qw, double qx, double qy, double qz,
double *x, double *y, double *z); double *x, double *y, double *z);
// Similarly, compute a unit quaternion in terms of two basis vectors. // Similarly, compute a unit quaternion in terms of two basis vectors.
void Slvs_MakeQuaternion(double ux, double uy, double uz, DLL void Slvs_MakeQuaternion(double ux, double uy, double uz,
double vx, double vy, double vz, double vx, double vy, double vz,
double *qw, double *qx, double *qy, double *qz); double *qw, double *qx, double *qy, double *qz);
//------------------------------------- //-------------------------------------

View File

@ -4,6 +4,7 @@ crude DXF, HPGL import
a request to import a plane thing a request to import a plane thing
make export assemble only contours in same group make export assemble only contours in same group
make export rewrite fill color same as stroke color make export rewrite fill color same as stroke color
choose split point closest to mouse pointer
----- -----
rounding, as a special group rounding, as a special group