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
parent
46a7d0f719
commit
9ae29aa0e9
|
@ -29,11 +29,12 @@ all: $(OBJDIR)/ctest.exe
|
|||
clean:
|
||||
rm -f obj/*
|
||||
|
||||
$(OBJDIR)/slvs.lib: $(SSOBJS) $(LIBOBJS) $(W32OBJS)
|
||||
@lib /OUT:$(OBJDIR)/slvs.lib $(SSOBJS) $(LIBOBJS) $(W32OBJS)
|
||||
@echo slvs.lib
|
||||
$(OBJDIR)/slvs.dll: $(SSOBJS) $(LIBOBJS) $(W32OBJS)
|
||||
@$(CC) /LD -Fe$(OBJDIR)/slvs.dll $(SSOBJS) $(LIBOBJS) $(W32OBJS) $(LIBS)
|
||||
@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)
|
||||
@echo ctest.exe
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "solvespace.h"
|
||||
#define EXPORT_DLL
|
||||
#include "slvs.h"
|
||||
|
||||
Sketch SK;
|
||||
|
|
|
@ -15,6 +15,12 @@
|
|||
#ifndef __SLVS_H
|
||||
#define __SLVS_H
|
||||
|
||||
#ifdef EXPORT_DLL
|
||||
#define DLL __declspec( dllexport )
|
||||
#else
|
||||
#define DLL __declspec( dllimport )
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -181,7 +187,7 @@ typedef struct {
|
|||
int result;
|
||||
} 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
|
||||
|
@ -190,15 +196,15 @@ void Slvs_Solve(Slvs_System *sys, Slvs_hGroup hg);
|
|||
// basis vectors
|
||||
// U V N
|
||||
// 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);
|
||||
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);
|
||||
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);
|
||||
|
||||
// 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 *qw, double *qx, double *qy, double *qz);
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ crude DXF, HPGL import
|
|||
a request to import a plane thing
|
||||
make export assemble only contours in same group
|
||||
make export rewrite fill color same as stroke color
|
||||
choose split point closest to mouse pointer
|
||||
|
||||
-----
|
||||
rounding, as a special group
|
||||
|
|
Loading…
Reference in New Issue