Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to `quantize_2bit' #4

Open
gijzelaerr opened this issue Mar 27, 2018 · 1 comment
Open

undefined reference to `quantize_2bit' #4

gijzelaerr opened this issue Mar 27, 2018 · 1 comment
Assignees

Comments

@gijzelaerr
Copy link
Member

λ  make
cc -Wno-unused-result -O3 -Wall -Werror=return-local-addr -DUSE_LIBS3_20 -DFOLD_USE_INTRINSICS -I/opt/vegas/include -I/usr/include/cfitsio -I/usr/include/mysql -I/usr/local/cuda/include -I/usr/include/libbson-1.0 -I/usr/include/libmongoc-1.0  -I/usr/local/include -I/usr/local/include/libbson-1.0 -I/usr/local/include/libmongoc-1.0 raw_quant.c -o raw_quant guppi_status.o guppi_databuf.o guppi_udp.o guppi_error.o guppi_params.o guppi_time.o median.o setimysql.o imswap.o write_psrfits.o read_psrfits.o misc_utils.o read_filterbank_header.o filterbankutil.o fold.o polyco.o hget.o hput.o sla.o downsample.o barycenter.o chkio.o s3util.o -L/opt/vegas/lib -I/opt/vegas/include -L/usr/local/cuda/lib64 -lfftw3f_threads -lcfitsio -lm -lgsl -lgslcblas -lpthread -I/usr/include/cfitsio -lfftw3f -L/usr/lib64/mysql -lmysqlclient -lcufft -lcudart -Lslalib -ls3 -lmongoc-1.0 -lbson-1.0 -lstdc++  -lsla
raw_quant.c: In function ‘main’:
raw_quant.c:45:8: warning: unused variable ‘b’ [-Wunused-variable]
  int a,b,c;
        ^
raw_quant.c:45:6: warning: unused variable ‘a’ [-Wunused-variable]
  int a,b,c;
      ^
raw_quant.c:44:19: warning: unused variable ‘z’ [-Wunused-variable]
  long int x=0,y=0,z=0;
                   ^
/tmp/ccNkCIIn.o: In function `main':
raw_quant.c:(.text.startup+0x4d7): undefined reference to `quantize_2bit'
collect2: error: ld returned 1 exit status
Makefile:151: recipe for target 'raw_quant' failed
make: *** [raw_quant] Error 1

My guess is that gcc 7.3.0 uses C99 standard now, and the semantics for inlines are different.

https://stackoverflow.com/questions/19068705/undefined-reference-when-calling-inline-function

@gijzelaerr
Copy link
Member Author

fixed in #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants