[so] tema3 - Linkare cu Robocheck

Sorin Serbanescu so@cursuri.cs.pub.ro
29 Nov 2004 16:02:48 -0000


Nu reusesc sa linkez cu robocheck si habar nu am unde nu merge bine...
 
compilez cu:
 
gcc -shared -o Monitor.dll -Wall -DMONITOR_EXPORTS Monitor.cpp -L./ -lrobocheck
 
iar in directorul in care dau comanda se afla si robocheck.dll si robocheck.h
 
indiferent daca dau cu -lrobocheck sau fara -lrobocheck, outputul este acelasi:
 
$ make
gcc -shared -o Monitor.dll -Wall -DMONITOR_EXPORTS Monitor.cpp -L./ -lrobocheck
..../Temp/ccuYaaaa.o(.text+0x56):Monitor.cpp: undefined reference to `robocheck_malloc(int, int, char const*)'
.../Temp/ccuYaaaa.o(.text+0x98):Monitor.cpp: undefined reference to `robocheck_malloc(int, int, char const*)'
.../Temp/ccuYaaaa.o(.text+0xb7):Monitor.cpp: undefined reference to `robocheck_malloc(int, int, char const*)'
.../Temp/ccuYaaaa.o(.text+0x193):Monitor.cpp: undefined reference to `robocheck_CloseHandle(int, char const*, void*)'
...
...
...
make: *** [Monitor.dll] Error 1
 
$ ls
Makefile  Monitor.cpp  Monitor.h  SC.cpp  barbieri.cpp  robocheck.dll  robocheck.h

am inclus in fisierul Monitor.cpp tot ce trebuie:
 
#define ROBOCHECK_WIN
#include "robocheck.h"

dupa restul de includuri.
 
am incercat si diferite variante: -L. sau -L./
 
curios ca tema1 si testele din zipul robocheck merg la compilare.
tema se compileaza si ruleaza fara probleme daca nu incerc linkarea cu robocheck



----

Home, no matter how far...
http://www.home.ro