Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #10777

Re: find c files within c++ project

From Nobody <nobody@nowhere.com>
Subject Re: find c files within c++ project
Date 2011-10-10 18:05 +0100
Message-Id <pan.2011.10.10.17.05.09.192000@nowhere.com>
Newsgroups comp.lang.c++
References <5bce53f2-fedb-43fa-a96d-88e88fd8fd3f@h10g2000yqd.googlegroups.com>
Organization Zen Internet

Show all headers | View raw


On Mon, 10 Oct 2011 04:04:00 -0700, ahso wrote:

> I get tons of: undefined references so i suspect to have
> some c header files which need: extern "C"
> So how can I find those? Or can i put this in every header?

If you're including C headers which don't have the C++ "guards", then you
can do:

	extern "C" {
	#include <foo.h>
	}

This usually works, but there are things which can appear in a C header
which make it invalid as C++ (e.g. use of C++-specific keywords as
identifiers).

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

find c files within c++ project ahso <ahso47@yahoo.com> - 2011-10-10 04:04 -0700
  Re: find c files within c++ project Marcel Müller <news.5.maazl@spamgourmet.org> - 2011-10-10 13:29 +0200
  Re: find c files within c++ project Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-10-10 13:38 +0000
    Re: find c files within c++ project ahso <ahso47@yahoo.com> - 2011-10-10 09:19 -0700
  Re: find c files within c++ project Nobody <nobody@nowhere.com> - 2011-10-10 18:05 +0100
    Re: find c files within c++ project Juha Nieminen <nospam@thanks.invalid> - 2011-10-11 06:04 +0000

csiph-web