r03ert0 / meshgeometry

mesh geometry tools
25 stars 11 forks source link

Can't compile #5

Closed TheChymera closed 6 years ago

TheChymera commented 8 years ago

gcc (5.4.0) can't compile meshgeometry.c:

me@myhost ~/src/meshgeometry $ gcc -Wall -Wno-deprecated meshgeometry.c -o meshgeometry
meshgeometry.c:112:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
 #pragma mark -
 ^
meshgeometry.c:159:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
 #pragma mark -
 ^
meshgeometry.c:160:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
 #pragma mark [ Utilities ]
 ^
meshgeometry.c:446:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
 #pragma mark -
 ^
meshgeometry.c:447:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
 #pragma mark [ Format conversion ]
 ^
meshgeometry.c:613:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
 #pragma mark -
 ^
meshgeometry.c:2032:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
 #pragma mark -
 ^
meshgeometry.c:2261:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
 #pragma mark -
 ^
meshgeometry.c:2262:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
 #pragma mark [ Save TIFF ]
 ^
meshgeometry.c:2392:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
 #pragma mark -
 ^
meshgeometry.c:2393:0: warning: ignoring #pragma mark  [-Wunknown-pragmas]
 #pragma mark [ Geometry functions ]
 ^
meshgeometry.c: In function ‘fixnonmanifold_tris’:
meshgeometry.c:3352:10: warning: variable ‘np1’ set but not used [-Wunused-but-set-variable]
  int     np1;
          ^
meshgeometry.c: In function ‘lissencephalic’:
meshgeometry.c:3851:16: warning: variable ‘np0’ set but not used [-Wunused-but-set-variable]
     int     np,np0;
                ^
meshgeometry.c: In function ‘tangentLaplace’:
meshgeometry.c:4744:18: warning: variable ‘x’ set but not used [-Wunused-but-set-variable]
     float3D *tmp,x,dx,*tmp1,nn;
                  ^
/tmp/ccKtRXXs.o: In function `norm3D':
meshgeometry.c:(.text+0x2a9): undefined reference to `sqrt'
/tmp/ccKtRXXs.o: In function `triangle_area':
meshgeometry.c:(.text+0xabc): undefined reference to `sqrt'
/tmp/ccKtRXXs.o: In function `intersect_VectorTriangle':
meshgeometry.c:(.text+0xe78): undefined reference to `sqrt'
/tmp/ccKtRXXs.o: In function `rainbow':
meshgeometry.c:(.text+0x97e4): undefined reference to `floor'
/tmp/ccKtRXXs.o: In function `absgi':
meshgeometry.c:(.text+0x997c): undefined reference to `log'
meshgeometry.c:(.text+0x998b): undefined reference to `log'
meshgeometry.c:(.text+0x99c7): undefined reference to `exp'
/tmp/ccKtRXXs.o: In function `align':
meshgeometry.c:(.text+0x9e9a): undefined reference to `cos'
meshgeometry.c:(.text+0x9eaf): undefined reference to `cos'
meshgeometry.c:(.text+0x9ecd): undefined reference to `sin'
meshgeometry.c:(.text+0x9ef2): undefined reference to `cos'
meshgeometry.c:(.text+0x9f0f): undefined reference to `cos'
meshgeometry.c:(.text+0x9f24): undefined reference to `sin'
meshgeometry.c:(.text+0x9f45): undefined reference to `sin'
meshgeometry.c:(.text+0x9f6b): undefined reference to `sin'
meshgeometry.c:(.text+0x9f80): undefined reference to `sin'
meshgeometry.c:(.text+0x9fa1): undefined reference to `cos'
meshgeometry.c:(.text+0x9fb6): undefined reference to `sin'
meshgeometry.c:(.text+0x9fd7): undefined reference to `cos'
meshgeometry.c:(.text+0x9ffd): undefined reference to `sin'
meshgeometry.c:(.text+0xa012): undefined reference to `cos'
meshgeometry.c:(.text+0xa030): undefined reference to `cos'
meshgeometry.c:(.text+0xa045): undefined reference to `cos'
meshgeometry.c:(.text+0xa066): undefined reference to `sin'
meshgeometry.c:(.text+0xa07b): undefined reference to `sin'
meshgeometry.c:(.text+0xa09c): undefined reference to `sin'
meshgeometry.c:(.text+0xa0c2): undefined reference to `cos'
meshgeometry.c:(.text+0xa0e7): undefined reference to `sin'
meshgeometry.c:(.text+0xa104): undefined reference to `sin'
meshgeometry.c:(.text+0xa119): undefined reference to `sin'
meshgeometry.c:(.text+0xa13a): undefined reference to `cos'
meshgeometry.c:(.text+0xa160): undefined reference to `sin'
meshgeometry.c:(.text+0xa181): undefined reference to `cos'
meshgeometry.c:(.text+0xa196): undefined reference to `sin'
meshgeometry.c:(.text+0xa1b4): undefined reference to `cos'
meshgeometry.c:(.text+0xa1c9): undefined reference to `cos'
meshgeometry.c:(.text+0xa72c): undefined reference to `cos'
meshgeometry.c:(.text+0xa741): undefined reference to `cos'
meshgeometry.c:(.text+0xa75f): undefined reference to `sin'
meshgeometry.c:(.text+0xa784): undefined reference to `cos'
meshgeometry.c:(.text+0xa7a1): undefined reference to `cos'
meshgeometry.c:(.text+0xa7b6): undefined reference to `sin'
meshgeometry.c:(.text+0xa7d7): undefined reference to `sin'
meshgeometry.c:(.text+0xa7fd): undefined reference to `sin'
meshgeometry.c:(.text+0xa812): undefined reference to `sin'
meshgeometry.c:(.text+0xa833): undefined reference to `cos'
meshgeometry.c:(.text+0xa848): undefined reference to `sin'
meshgeometry.c:(.text+0xa869): undefined reference to `cos'
meshgeometry.c:(.text+0xa88f): undefined reference to `sin'
meshgeometry.c:(.text+0xa8a4): undefined reference to `cos'
meshgeometry.c:(.text+0xa8c2): undefined reference to `cos'
meshgeometry.c:(.text+0xa8d7): undefined reference to `cos'
meshgeometry.c:(.text+0xa8f8): undefined reference to `sin'
meshgeometry.c:(.text+0xa90d): undefined reference to `sin'
meshgeometry.c:(.text+0xa92e): undefined reference to `sin'
meshgeometry.c:(.text+0xa954): undefined reference to `cos'
meshgeometry.c:(.text+0xa979): undefined reference to `sin'
meshgeometry.c:(.text+0xa996): undefined reference to `sin'
meshgeometry.c:(.text+0xa9ab): undefined reference to `sin'
meshgeometry.c:(.text+0xa9cc): undefined reference to `cos'
meshgeometry.c:(.text+0xa9f2): undefined reference to `sin'
meshgeometry.c:(.text+0xaa13): undefined reference to `cos'
meshgeometry.c:(.text+0xaa28): undefined reference to `sin'
meshgeometry.c:(.text+0xaa46): undefined reference to `cos'
meshgeometry.c:(.text+0xaa5b): undefined reference to `cos'
meshgeometry.c:(.text+0xaf83): undefined reference to `cos'
meshgeometry.c:(.text+0xaf98): undefined reference to `cos'
meshgeometry.c:(.text+0xafb6): undefined reference to `sin'
meshgeometry.c:(.text+0xafdb): undefined reference to `cos'
meshgeometry.c:(.text+0xaff8): undefined reference to `cos'
meshgeometry.c:(.text+0xb00d): undefined reference to `sin'
meshgeometry.c:(.text+0xb02e): undefined reference to `sin'
meshgeometry.c:(.text+0xb054): undefined reference to `sin'
meshgeometry.c:(.text+0xb069): undefined reference to `sin'
meshgeometry.c:(.text+0xb08a): undefined reference to `cos'
meshgeometry.c:(.text+0xb09f): undefined reference to `sin'
meshgeometry.c:(.text+0xb0c0): undefined reference to `cos'
meshgeometry.c:(.text+0xb0e6): undefined reference to `sin'
meshgeometry.c:(.text+0xb0fb): undefined reference to `cos'
meshgeometry.c:(.text+0xb119): undefined reference to `cos'
meshgeometry.c:(.text+0xb12e): undefined reference to `cos'
meshgeometry.c:(.text+0xb14f): undefined reference to `sin'
meshgeometry.c:(.text+0xb164): undefined reference to `sin'
meshgeometry.c:(.text+0xb185): undefined reference to `sin'
meshgeometry.c:(.text+0xb1ab): undefined reference to `cos'
meshgeometry.c:(.text+0xb1d0): undefined reference to `sin'
meshgeometry.c:(.text+0xb1ed): undefined reference to `sin'
meshgeometry.c:(.text+0xb202): undefined reference to `sin'
meshgeometry.c:(.text+0xb223): undefined reference to `cos'
meshgeometry.c:(.text+0xb249): undefined reference to `sin'
meshgeometry.c:(.text+0xb26a): undefined reference to `cos'
meshgeometry.c:(.text+0xb27f): undefined reference to `sin'
meshgeometry.c:(.text+0xb29d): undefined reference to `cos'
meshgeometry.c:(.text+0xb2b2): undefined reference to `cos'
/tmp/ccKtRXXs.o: In function `cot':
meshgeometry.c:(.text+0xd0f7): undefined reference to `sqrt'
/tmp/ccKtRXXs.o: In function `depth':
meshgeometry.c:(.text+0xfe8b): undefined reference to `pow'
meshgeometry.c:(.text+0xfee2): undefined reference to `pow'
meshgeometry.c:(.text+0xff42): undefined reference to `pow'
meshgeometry.c:(.text+0xff6f): undefined reference to `sqrt'
/tmp/ccKtRXXs.o: In function `drawSurface':
meshgeometry.c:(.text+0x1031c): undefined reference to `glutInit'
meshgeometry.c:(.text+0x10326): undefined reference to `glutInitDisplayMode'
meshgeometry.c:(.text+0x10345): undefined reference to `glutInitWindowSize'
meshgeometry.c:(.text+0x1034f): undefined reference to `glutCreateWindow'
meshgeometry.c:(.text+0x10359): undefined reference to `glEnable'
meshgeometry.c:(.text+0x10363): undefined reference to `glEnable'
meshgeometry.c:(.text+0x10391): undefined reference to `glClearColor'
meshgeometry.c:(.text+0x103b0): undefined reference to `glViewport'
meshgeometry.c:(.text+0x103ba): undefined reference to `glClear'
meshgeometry.c:(.text+0x103c4): undefined reference to `glMatrixMode'
meshgeometry.c:(.text+0x103c9): undefined reference to `glLoadIdentity'
meshgeometry.c:(.text+0x10498): undefined reference to `glOrtho'
meshgeometry.c:(.text+0x104a2): undefined reference to `glMatrixMode'
meshgeometry.c:(.text+0x104a7): undefined reference to `glLoadIdentity'
meshgeometry.c:(.text+0x104ea): undefined reference to `gluLookAt'
meshgeometry.c:(.text+0x104f8): undefined reference to `glEnableClientState'
meshgeometry.c:(.text+0x10513): undefined reference to `glVertexPointer'
meshgeometry.c:(.text+0x1051d): undefined reference to `glEnableClientState'
meshgeometry.c:(.text+0x10538): undefined reference to `glColorPointer'
meshgeometry.c:(.text+0x1055b): undefined reference to `glDrawElements'
meshgeometry.c:(.text+0x10572): undefined reference to `glEnable'
meshgeometry.c:(.text+0x10581): undefined reference to `glPolygonMode'
meshgeometry.c:(.text+0x1058b): undefined reference to `glCullFace'
meshgeometry.c:(.text+0x1059a): undefined reference to `glPolygonMode'
meshgeometry.c:(.text+0x105a7): undefined reference to `glLineWidth'
meshgeometry.c:(.text+0x105b1): undefined reference to `glCullFace'
meshgeometry.c:(.text+0x105bb): undefined reference to `glDepthFunc'
meshgeometry.c:(.text+0x105cc): undefined reference to `glColor3f'
meshgeometry.c:(.text+0x105d6): undefined reference to `glBegin'
meshgeometry.c:(.text+0x106ce): undefined reference to `glVertex3fv'
meshgeometry.c:(.text+0x106da): undefined reference to `glVertex3fv'
meshgeometry.c:(.text+0x106e6): undefined reference to `glVertex3fv'
meshgeometry.c:(.text+0x10704): undefined reference to `glEnd'
meshgeometry.c:(.text+0x1070e): undefined reference to `glDisable'
meshgeometry.c:(.text+0x10760): undefined reference to `glReadPixels'
/tmp/ccKtRXXs.o: In function `fixSmall':
meshgeometry.c:(.text+0x122e2): undefined reference to `acos'
/tmp/ccKtRXXs.o: In function `stdData':
meshgeometry.c:(.text+0x15d52): undefined reference to `pow'
/tmp/ccKtRXXs.o: In function `relax':
meshgeometry.c:(.text+0x197ec): undefined reference to `pow'
meshgeometry.c:(.text+0x19905): undefined reference to `pow'
meshgeometry.c:(.text+0x19a1e): undefined reference to `pow'
/tmp/ccKtRXXs.o: In function `rotate':
meshgeometry.c:(.text+0x1a38f): undefined reference to `cos'
meshgeometry.c:(.text+0x1a39e): undefined reference to `cos'
meshgeometry.c:(.text+0x1a3b6): undefined reference to `sin'
meshgeometry.c:(.text+0x1a3d5): undefined reference to `cos'
meshgeometry.c:(.text+0x1a3e9): undefined reference to `cos'
meshgeometry.c:(.text+0x1a3f8): undefined reference to `sin'
meshgeometry.c:(.text+0x1a410): undefined reference to `sin'
meshgeometry.c:(.text+0x1a42d): undefined reference to `sin'
meshgeometry.c:(.text+0x1a43c): undefined reference to `sin'
meshgeometry.c:(.text+0x1a454): undefined reference to `cos'
meshgeometry.c:(.text+0x1a463): undefined reference to `sin'
meshgeometry.c:(.text+0x1a47b): undefined reference to `cos'
meshgeometry.c:(.text+0x1a498): undefined reference to `sin'
meshgeometry.c:(.text+0x1a4a7): undefined reference to `cos'
meshgeometry.c:(.text+0x1a4bf): undefined reference to `cos'
meshgeometry.c:(.text+0x1a4ce): undefined reference to `cos'
meshgeometry.c:(.text+0x1a4e6): undefined reference to `sin'
meshgeometry.c:(.text+0x1a4f5): undefined reference to `sin'
meshgeometry.c:(.text+0x1a50d): undefined reference to `sin'
meshgeometry.c:(.text+0x1a52a): undefined reference to `cos'
meshgeometry.c:(.text+0x1a549): undefined reference to `sin'
meshgeometry.c:(.text+0x1a55d): undefined reference to `sin'
meshgeometry.c:(.text+0x1a56c): undefined reference to `sin'
meshgeometry.c:(.text+0x1a584): undefined reference to `cos'
meshgeometry.c:(.text+0x1a5a1): undefined reference to `sin'
meshgeometry.c:(.text+0x1a5bf): undefined reference to `cos'
meshgeometry.c:(.text+0x1a5ce): undefined reference to `sin'
meshgeometry.c:(.text+0x1a5e6): undefined reference to `cos'
meshgeometry.c:(.text+0x1a5f5): undefined reference to `cos'
/tmp/ccKtRXXs.o: In function `stereographic':
meshgeometry.c:(.text+0x1b93f): undefined reference to `atan2'
meshgeometry.c:(.text+0x1b9bd): undefined reference to `acos'
meshgeometry.c:(.text+0x1b9f8): undefined reference to `cos'
meshgeometry.c:(.text+0x1ba37): undefined reference to `sin'
/tmp/ccKtRXXs.o: In function `subdivide':
meshgeometry.c:(.text+0x1caa0): undefined reference to `cos'
/tmp/ccKtRXXs.o: In function `uniform':
meshgeometry.c:(.text+0x1fe54): undefined reference to `pow'
meshgeometry.c:(.text+0x20544): undefined reference to `sqrt'
collect2: error: ld returned 1 exit status
r03ert0 commented 6 years ago

hello @TheChymera , The gcc command is missing the -lm switch. I'll add it to the compile.sh script.

r03ert0 commented 6 years ago

I modified the compile.sh script. I tested on CentOS 6, and it works. I haven't checked on a windows machine, though...

TheChymera commented 6 years ago

Can't help you with windows, but it also works on Gentoo Linux, with gcc 7.2.0 (x86_64-pc-linux-gnu-7.2.0).

r03ert0 commented 6 years ago

cool, thank you. I'll open an issue asking for help with testing the windows compilation.