Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Unresolved inclusion problem,
Unresolved inclusion problem, [message #921122] Sun, 23 September 2012 21:23
James Salisbury is currently offline James Salisbury
Messages: 2
Registered: September 2012
Junior Member
Hi,
I am trying to use the modbus library with some new code, the modbus library and the new code are in seperate projects in the same workspace. The new code is stored in the directory tree within the workspace, the library code is held outside the workspace. I can get the library to complile but I get unresolved inclusion messagages when I try to use the library in the new code. When I go F3 to look at the declaration of the problem functions it displayes the code, so at some level it understands what I am trying to do. What am I doing wrong with my libraries?
I have attached the workspace and the library.
22:51:16 **** Build of configuration Default for project libmodbus-3.0.3 ****
make all 
make  all-recursive
make[1]: Entering directory `/home/james/projects/archive/libmodbus-3.0.3'
Making all in src
make[2]: Entering directory `/home/james/projects/archive/libmodbus-3.0.3/src'
  CC     modbus.lo
  CC     modbus-data.lo
  CC     modbus-rtu.lo
  CC     modbus-tcp.lo
  CCLD   libmodbus.la
make[2]: Leaving directory `/home/james/projects/archive/libmodbus-3.0.3/src'
Making all in doc
make[2]: Entering directory `/home/james/projects/archive/libmodbus-3.0.3/doc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/james/projects/archive/libmodbus-3.0.3/doc'
Making all in tests
make[2]: Entering directory `/home/james/projects/archive/libmodbus-3.0.3/tests'
make  all-am
make[3]: Entering directory `/home/james/projects/archive/libmodbus-3.0.3/tests'
  CC     bandwidth-server-one.o
  CCLD   bandwidth-server-one
  CC     bandwidth-server-many-up.o
  CCLD   bandwidth-server-many-up
  CC     bandwidth-client.o
  CCLD   bandwidth-client
  CC     random-test-server.o
  CCLD   random-test-server
  CC     random-test-client.o
  CCLD   random-test-client
  CC     unit-test-server.o
  CCLD   unit-test-server
  CC     unit-test-client.o
  CCLD   unit-test-client
  CC     version.o
  CCLD   version
make[3]: Leaving directory `/home/james/projects/archive/libmodbus-3.0.3/tests'
make[2]: Leaving directory `/home/james/projects/archive/libmodbus-3.0.3/tests'
make[2]: Entering directory `/home/james/projects/archive/libmodbus-3.0.3'
make[2]: Leaving directory `/home/james/projects/archive/libmodbus-3.0.3'
make[1]: Leaving directory `/home/james/projects/archive/libmodbus-3.0.3'

22:51:19 Build Finished (took 3s.75ms)
22:22:11 **** Incremental Build of configuration Debug for project meter_code ****
make all 
Building target: meter_code
Invoking: GCC C Linker
gcc -L"/home/james/projects/archive/libmodbus-3.0.3" -L"/home/james/projects/archive/libmodbus-3.0.3/src" -L/home/james/projects/archive/libmodbus-3.0.3/src -L/home/james/projects/archive/libmodbus-3.0.3 -o "meter_code"  ./src/meter_code.o   
./src/meter_code.o: In function `main':
/home/james/projects/meter_projects/meter_code/Debug/../src/meter_code.c:85: undefined reference to `modbus_new_rtu'
/home/james/projects/meter_projects/meter_code/Debug/../src/meter_code.c:86: undefined reference to `modbus_set_slave'
/home/james/projects/meter_projects/meter_code/Debug/../src/meter_code.c:87: undefined reference to `modbus_read_input_registers'
/home/james/projects/meter_projects/meter_code/Debug/../src/meter_code.c:103: undefined reference to `modbus_close'
/home/james/projects/meter_projects/meter_code/Debug/../src/meter_code.c:104: undefined reference to `modbus_free'
collect2: ld returned 1 exit status
make: *** [meter_code] Error 1

Thanks

[Updated on: Sun, 23 September 2012 21:55]

Report message to a moderator

Previous Topic:Setting up Eclipse for C++
Next Topic:make
Goto Forum:
  


Current Time: Sun Oct 26 01:17:52 GMT 2014

Powered by FUDForum. Page generated in 0.01938 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software