Ubuntu, How to link .exp file in C?

299 Views Asked by At

How to link .exp file in C?

I can link .so, .o, .a, .la, lo and .slo files.
But there is file httpd.h with .exp file only(No .so, .o, .a, .la, lo and .slo files) and I need to use a function from it.
And, I am getting undefined symbol error.

undefined symbol: ap_cstr_casecmp

2

There are 2 best solutions below

1
Anton Malyshev On

.exp file contains the list of exported symbols only. There is no point to link with it, you need the library to link with.

2
Rufflewind On

.exp is used on Windows only and is of no use on Ubuntu. You need a .so or .a file to link to on Ubuntu.

You need to find the library file (lib<name>.so or lib<name>.a or similar, where <name> is the name of the library) and then link with -L<path> -l<name> where <path> should be replaced by the path to the directory that contains the library file. If <path> is /usr/lib then -L<path> can be omitted.