[sane-devel] Makefile errror in Sane-backend-1.0.15

Henning Meier-Geinitz henning at meier-geinitz.de
Mon Feb 20 18:34:59 UTC 2006


Hi,

On 2006-02-20 12:52, sofian.teja at xuite.net wrote:
> I was trying to write the driver for linux, and I ve got problem when
> I try to make in fedora core 4 , the error message :
> ../../include/sane/sanei_backend.h: error : previous declaration of
> sane status sane_1000_init(Sane_Int*, void(*)(Const SANE_char*.... )

Can we see your complete source code, please? Otherwise it's quite
difficult to find out what's actually wrong.

> With "C++ linkage". 

SANE provides a C API, not C++. So it should be possible to link to
the backends from C++, but mixing C++ and C inside the SANE tree may
lead to starnge results.

> 1000.cpp line... error: conflicts with new declaration with 'c' linkage.

You seem to declare something that is already declared in
sanei_backend.h.

> I already try to solve this error and is not only one , they are many
> of it. my gcc version in fedora core 4 is 4.0.0 and I also try in
> different OS to compile, when I try to makefile in Redhat 9 with GCC
> version 3.2.2 theres is no error. ???  my question is if my driver
> won't work in FC 4 ??  because i am very new in linux programming,
> why in Redhat 9 is ok but not in FC4?  Thanks for advance.

At least with recent versions of sane-backends, buliding with gcc 4.x
works. As you are a developer, I strongly recommend to not use old
SANE versions like 1.0.15 anyway.

Bye,
  Henning



More information about the sane-devel mailing list