0

I am porting C-Motif code project from unix to ubuntu linux system.

I'm able to solve various problems but still there are some problems while doing make.

/usr/bin/ld: cannot find -lXmu
/usr/bin/ld: cannot find -lnls
/usr/bin/ld: cannot find -lsocket
/usr/bin/ld: cannot find -ll
collect2: error: ld returned 1 exit status
make: *** [../bin/ipsge] Error 1
James Z
  • 12,209
  • 10
  • 24
  • 44
  • 4 libraries are not found by the linker. What is the exact OS name and version of the UNIX you're porting from? – Bass Aug 07 '15 at 08:44

1 Answers1

3

For -lXmu install:

sudo apt-get install libxmu-headers

sudo apt-get install libxmu-dev

Try compiling without -lnls / -lsocket and see if the problem is fixed.

I don't know libl.a What flavor of UNIX are you porting from?

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
Muehlkreuz
  • 56
  • 3
  • `-ll` is probably a support library for lex, so `-lfl` would be the equivalent if flex was used. – AProgrammer Nov 13 '15 at 16:54
  • Not sure why Motif should need flex. Anyway I'd try compiling without -ll to see what happens. It's probably a remnant from the original Makefile and can safely be dropped just like the socket stuff (contained in C library). – Muehlkreuz Nov 15 '15 at 06:21
  • Either remnant of standard Makefiles or needed for other dependencies than Motif. (IIRC, socket and nls were needed on Solaris for things which are part of libc on linux) – AProgrammer Nov 15 '15 at 14:03