linux - Compiling C code with external library references -


i on rhel 6.0 , got hold of source code join command(hopefully right source!!). work on c code , hence finding difficult. trying compile , run c code join, running compile time errors.

g++ join.c join.c:19:20: error: config.h: no such file or directory join.c:25:20: error: system.h: no such file or directory join.c:27:25: error: hard-locale.h: no such file or directory join.c:28:24: error: linebuffer.h: no such file or directory join.c:29:24: error: memcasecmp.h: no such file or directory join.c:30:19: error: quote.h: no such file or directory join.c:31:21: error: stdio--.h: no such file or directory join.c:32:22: error: xmemcoll.h: no such file or directory join.c:33:21: error: xstrtol.h: no such file or directory join.c:34:22: error: argmatch.h: no such file or directory 

since not aware of find these libraries(i did google each 1 , spread on different websites), can please guide me how can link these libraries , compile source code of join command?

this not linking problem suggest. instead, these errors because g++ can't find these files: config.h, system.h, ..., #included (indirectly) join.c.

what find these files on system, , add many -i<directory> options behind g++ there directories found these files in. man g++ more info.

you'll need find libraries need link against. you'll need specify more -i's.

on other hand, aren't there 'configure' or other package files? don't have specify compiler flags (like -i) hand. instead, it's common example makefile's generated such configuration file, after have type make.

i advise has done before, because don't seem understand basics of c program compilation. can cost lot of precious time without results. luck anyway!


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -