linker-warning

Header Guards and LNK4006

Hi, I have a character array defined in a header //header.h const char* temp[] = {"JeffSter"}; The header if #defined guarded and has a #pragma once at the top. If this header is included in multiple places, I get an LNK4006 - char const * * temp already defined in blahblah.obj. So, I have a couple of questions about this Why does...

How do you suppress GCC linker warnings?

I've been on a crusade lately to eliminate warnings from our code and have become more familiar with GCC warning flags (such as -Wall, -Wno-<warning to disable>, -fdiagnostics-show-option, etc.). However I haven't been able to figure out how to disable (or even control) linker warnings. The most common linker warning that I was getting i...

dlerror: Undefined symbol "_nss_cache_cycle_prevention_function" on FreeBSD 7.2

I have an ANSI C program that dynamically loads a .so file using dlopen() passing RTLD_LAZY. I receive Undefined symbol "_nss_cache_cycle_prevention_function" warnings whenever the .so file is accessed in FreeBSD 7.2. nss_cache_cycle_prevention_function() is not one of my program's functions and I imagine must be coming from FreeBSD....