Use of own C functions with Qt projects
W. Tasin
tasin at e-technik.fh-muenchen.de
Fri Nov 24 13:17:56 GMT 2000
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 <file>.c with <header>.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 at kdevelop.org with the following body:
> unsubscribe »your-email-address«
--
The KDevelop project: tasin at 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----------:
<Key-Fingerprint: 1610 835F 0080 32F4 6140 6CF7 A7D0 44CD 7961A645>
<http://wwwkeys.pgp.net:11371/pks/lookup?op=index&search=0x7961A645&fingerprint=on>
-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«
More information about the KDevelop
mailing list