Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7678715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:42:41+00:00 2026-05-31T17:42:41+00:00

I wrote a program (myreader.c) to manipulate a RFID reader. I compile by type

  • 0

I wrote a program (myreader.c) to manipulate a RFID reader.

I compile by type “make” in the root of the package, makefile is shown below

  # CC and CFLAGS are varilables 
  CC=gcc
  CFLAGS = -c
  # -c option ask g++ to compile the source files, but do not link.
  # -g option is for debugging version
  # -O2 option is for optimized version
  OPTFLAGS = -O2 -g

  myreader    : src/myreader.c
          $(CC) $(OPTFLAGS) src/myreader.c src/crypto1.c src/nfc-utils.c -lnfc -o ./bin/myreader 

  # clean all the .o and executable files
  clean:
          rm -rf bin/myreader

and it works well on my original machine(64 bits, Ubuntu 12.04 LTS), and the only problem is, when I type make, the warning info would come up.

  src/myreader.c:519:6: warning: conflicting types for ‘printResult’ [enabled by default]
  src/myreader.c:211:3: note: previous implicit declaration of ‘printResult’ was here

But /bin/myreader works well.


However, when I move the package to another machine(64 bits, Ubuntu 11.10), and type make in the same way as in the original machine.

Error messages in the below appears:

  berln@ubuntu:~/桌面/useful code$ make
  gcc -O2 -g src/myreader.c src/crypto1.c src/nfc-utils.c -lnfc -o ./bin/myreader
  src/myreader.c:519:6: warning: conflicting types for ‘printResult’ [enabled by default]
  src/myreader.c:211:3: note: previous implicit declaration of ‘printResult’ was here
  /tmp/ccrKvhjm.o: In function `mf_enhanced_auth':/home/berln/桌面/useful code/src/myreader.c:373: undefined reference to `nfc_configure'
  /home/berln/桌面/useful code/src/myreader.c:380: undefined reference to `nfc_configure'
  /home/berln/桌面/useful code/src/myreader.c:390: undefined reference to `nfc_configure'
  /home/berln/桌面/useful code/src/myreader.c:434: undefined reference to `nfc_configure'
  /tmp/ccrKvhjm.o: In function `mf_configure':
  /home/berln/桌面/useful code/src/myreader.c:484: undefined reference to `nfc_configure'
  /tmp/ccrKvhjm.o:/home/berln/桌面/useful code/src/myreader.c:489: more undefined references to `nfc_configure' follow
  /tmp/ccrKvhjm.o: In function `main':
  /home/berln/桌面/useful code/src/myreader.c:155: undefined reference to `nfc_connect'
  /home/berln/桌面/useful code/src/myreader.c:213: undefined reference to `nfc_disconnect'
  collect2: ld returned 1 exit status
  make: *** [myreader] Error 1

I have no ideas why this error happened on only one machine instead of both.

If you need more information, you can download the package here.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:42:43+00:00Added an answer on May 31, 2026 at 5:42 pm

    Most likely your nfc library is missing or not installed properly on your other computer.

    One of the options you pass to the linker is -lnfc, which tells it to link to the nfc library. Your errors are coming from the linker, which cannot find the nfc_configure and other nfc_ symbols. This means that the linker cannot find these symbols. Check the nfc library installation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a program to calculate nth root of a number upto 2 decimal
I wrote a program to make a graphical Timeline and it works through some
I wrote a program to count blanks. I can compile it and run it,
I wrote a program in Ruby but I want to make an executable file
I wrote a program that reads a file with buffer reader and stores data
I wrote a program, which open docx package and changes some <w:t> -text in
I wrote a program in C with Ubuntu Linux and now I need to
I wrote a program which includes writing and reading from database. When I run
I wrote a program using AutoIT to fetch information from a number of websites
I wrote a program out, which was all in one file, and the methods

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.