I can't change the header files of library. Therefore when I included it in my code I did extern "C" { #include<c header file> ... }
instead of just #include and it worked. But the compiler is showing some errors in the header files I included, but of course there isn't anything wrong in them. I could include it this way as well right? Also I wrote a c file and a corresponding header file in /src folder and appended the 'squid_sources' as this: squid_sources = . ... .... usdpaa_if.h \ usdpaa_if.c Is this okay? As again it is showing errors in the usdpaa_if.c file and there are no syntax errors like the compiler says. I saw other folder in /src like compat had also included c files like this so I thought this would be right. Regards On Wed, Mar 25, 2015 at 4:32 PM, Amos Jeffries <squ...@treenet.co.nz> wrote: > On 25/03/2015 11:26 p.m., Priya Agarwal wrote: > > I could link the libraries. The problem was that libraries were C and > thus > > g++ wasn't creating right symbols. > > .h files fro C libraries need to contain the syntax: > > #if defined(__cplusplus) > extern "C" { > #endif > > ... library API ... > > #if defined(__cplusplus) > } > #endif > > > > > I have another question. > > what part of the source code handles shutdown or exiting (ctrl+c). > > src/main.cc > > Amos > _______________________________________________ > squid-users mailing list > squid-users@lists.squid-cache.org > http://lists.squid-cache.org/listinfo/squid-users >
_______________________________________________ squid-users mailing list squid-users@lists.squid-cache.org http://lists.squid-cache.org/listinfo/squid-users