Giter Site home page Giter Site logo

scmtiff's People

Contributors

rlk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scmtiff's Issues

bad name for glew on linux (64-bit)

gcc -std=c99 -Wall -m64 -fopenmp -O3  -I/usr/local/include -D_FILE_OFFSET_BITS=64 -DM_PI=3.14159265358979323846  -o scmogle err.o util.o scmdef.o scmdat.o scmio.o scm.o img.o scmogle.o -lz -lglew32 -lglut -lGL -lpthread -lm
/usr/bin/ld: cannot find -lglew32
collect2: error: ld returned 1 exit status

Didn't try on a 32-bit machine but the linker flags from pkg-config on 64-bit Ubuntu/Mint are:

$pkg-config --libs glew
-lGLEW -lGLU -lGL

unreliable path for gcc

From makefile:

CC = /usr/local/bin/gcc -std=c99 -Wall -m64 -fopenmp -O3

Simpler and more reliable to just use gcc without the path since /usr/local/bin is normally on the system path (at least for Ubuntu).

missing linker flag for math

scmtiff and smogle both need to link to the math library as shown below

gcc -std=c99 -Wall -m64 -fopenmp -O3  -I/usr/local/include -D_FILE_OFFSET_BITS=64 -DM_PI=3.14159265358979323846  -o scmtiff err.o util.o scmdef.o scmdat.o scmio.o scm.o img.o jpg.o png.o tif.o pds.o extrema.o convert.o rectify.o combine.o mipmap.o border.o finish.o polish.o normal.o sample.o scmtiff.o -ljpeg -ltiff -lpng -lz -lpthread
/usr/bin/ld: img.o: undefined reference to symbol 'fmod@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command lin

gcc -std=c99 -Wall -m64 -fopenmp -O3  -I/usr/local/include -D_FILE_OFFSET_BITS=64 -DM_PI=3.14159265358979323846  -o scmogle err.o util.o scmdef.o scmdat.o scmio.o scm.o img.o scmogle.o -lz -lGLEW -lglut -lGL -lpthread
/usr/bin/ld: img.o: undefined reference to symbol 'fmod@@GLIBC_2.2.5'

append -lm to the rules

scmtiff     : err.o util.o scmdef.o scmdat.o scmio.o scm.o img.o jpg.o png.o tif.o pds.o extrema.o convert.o rectify.o combine.o mipmap.o border.o finish.o polish.o normal.o sample.o scmtiff.o
    $(CC) $(CFLAGS) $(LFLAGS) -o $@ $^ $(LIBJPG) $(LIBTIF) $(LIBPNG) $(LIBZ) $(LIBEXT) -lm

scmogle : err.o util.o scmdef.o scmdat.o scmio.o scm.o img.o scmogle.o
    $(CC) $(CFLAGS) $(LFLAGS) -o $@ $^ $(LIBZ) $(LIBGLEW) $(LIBOGL) $(LIBEXT) -lm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.