Re: [Libphidget-devel] At loss with C...
Status: Alpha
Brought to you by:
jstrohm
|
From: Jack S. <js...@ja...> - 2002-09-07 21:48:31
|
On Sat, 2002-09-07 at 16:15, Vadim Tkachenko wrote: > Hello, > > Here: > > gcc -DPACKAGE=\"phidget\" -DVERSION=\"0.1p0\" -DHAVE_DLFCN_H=1 > -DHAVE_LIBUSB=1 -I. -I. -I../libphidget -L../libphidget -c phidget_c.c > phidget_c.c: In function > ain': > phidget_c.c:31: parse error before `struct' > phidget_c.c:39: `phidgets' undeclared (first use in this function) > phidget_c.c:39: (Each undeclared identifier is reported only once > phidget_c.c:39: for each function it appears in.) > make[2]: *** [phidget_c.o] Error 1 > > Makefile.am: > > --------8<------------------------------------ > bin_PROGRAMS = phidget_c phidget_cpp > > phidget_c_SOURCES = phidget_c.c > > phidget_c_LDADD = ../libphidget/libphidget.la > phidget_c_DEPENDENCIES = ../libphidget/libphidget.la > > phidget_cpp_SOURCES = phidget_cpp.cpp > > phidget_cpp_LDADD = ../libphidget/libphidget++.la > phidget_cpp_DEPENDENCIES = ../libphidget/libphidget++.la > > CFLAGS = -I../libphidget -L../libphidget > CXXFLAGS = -I../libphidget -I../phidget++ -L../libphidget -L../phidget++ > --------8<------------------------------------ > > phidget_c.c is former main.c, phidget_cpp.cc is former main.cc - to avoid > the name clash. Nothing's been changed inside. > > Now, my guess at the error is that now it is being compiled strictly as C, > and therefore &count doesn't count as a valid expression. Is this right? Or > the problem is somewhere else? > > I don't want to commit the code that doesn't compile... &count should be fine. that's just getting the address of count. I saw the same error when I tried to compile it on another box I have that I just installed Gentoo on. I'll play around and see what's wrong. |