From kdevelop Fri Nov 24 13:17:56 2000 From: "W. Tasin" Date: Fri, 24 Nov 2000 13:17:56 +0000 To: kdevelop Subject: Re: Use of own C functions with Qt projects X-MARC-Message: https://marc.info/?l=kdevelop&m=97507393309270 Fabrizio Santini wrote: > > Hi, > I need to use some my C function in a Qt project. > But when I try to include and build them, the compiler > answers: > > gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/lib/qt/include > -I/usr/X11R6/include -O0 -g3 -Wall -c plates.c > /bin/sh ../libtool --mode=link g++ -O0 -g3 -Wall -o plates4linux > -L/usr/X11R6/lib plates.o neural.o imageproc.o debug.o > plates4linuxview.o plates4linux.o main.o plates4linuxview.moc.o > plates4linux.moc.o -lqt -lXext -lX11 > g++ -O0 -g3 -Wall -o plates4linux plates.o neural.o imageproc.o debug.o > plates4linuxview.o plates4linux.o main.o plates4linuxview.moc.o > plates4linux.moc.o -L/usr/X11R6/lib -lqt -lXext -lX11 > plates4linux.o: In function `Plates4Linux::_RunPlatesRecognition(void)': > /home/fabrizio/projects/plates4linux/plates4linux/plates4linux.cpp:340: > undefined reference to `B(void)' > /home/fabrizio/projects/plates4linux/plates4linux/plates4linux.cpp:340: > undefined reference to `B(void)' > collect2: ld returned 1 exit status > make: *** [plates4linux] Error 1 > *** failed *** > > where B is the C function declared in a .c with
.h as > > int B(void); > > Can you help me? Hi, did you declared the follow in your header? ----- #ifdef __cplusplus extern "C" { #endif int B(void); #ifdef __cplusplus } #endif ----- Ciao Walter > > -- Fabrizio Santini > > - > to unsubscribe from this list send an email to kdevelop-request@kdevelop.org with the following body: > unsubscribe »your-email-address« -- The KDevelop project: tasin@kdevelop.de - http://www.kdevelop.org -- oohhh sveglia.... il mondo e' ammalato, ma x colpa di chi......... (Zucchero) :-------W. Tasin, FB 04,FHM-------------------PGP-KeyID:0x7961A645----------: - to unsubscribe from this list send an email to kdevelop-request@kdevelop.org with the following body: unsubscribe »your-email-address«