[so] Intrebare legata de linkare
Andreea Fulger
andreea.fulger at gmail.com
Mon Dec 4 16:48:49 EET 2006
Am si eu o mare curiozitate legata de build-post la tema 3 pe Windows.
Imi apar urmatoarele erori:
TestRW.obj : error LNK2019: unresolved external symbol "struct Monitor *
__cdecl CreateRWMonitor(void)" (?CreateRWMonitor@@YAPAUMonitor@@XZ)
referenced in function "void __cdecl TestRW(void)" (?TestRW@@YAXXZ)
TestStres.obj : error LNK2001: unresolved external symbol "struct Monitor *
__cdecl CreateRWMonitor(void)" (?CreateRWMonitor@@YAPAUMonitor@@XZ)
TestRW.obj : error LNK2019: unresolved external symbol "void __cdecl
StopCit(struct Monitor *)" (?StopCit@@YAXPAUMonitor@@@Z) referenced in
function "unsigned long __stdcall Functie1ABC(void *)" (?Functie1ABC@@
YGKPAX at Z)
TestStres.obj : error LNK2001: unresolved external symbol "void __cdecl
StopCit(struct Monitor *)" (?StopCit@@YAXPAUMonitor@@@Z)
TestRW.obj : error LNK2019: unresolved external symbol "void __cdecl
StartCit(struct Monitor *)" (?StartCit@@YAXPAUMonitor@@@Z) referenced in
function "unsigned long __stdcall Functie1ABC(void *)" (?Functie1ABC@@
YGKPAX at Z)
TestStres.obj : error LNK2001: unresolved external symbol "void __cdecl
StartCit(struct Monitor *)" (?StartCit@@YAXPAUMonitor@@@Z)
Ce e mai curios este ca eu nu am facut cu structuri ci cu clase -> .cpp.
(nu am uitat sa pun extern __declspec( dllexport ) deci nu e de aici
problema)
Din cate am observat in directorul de teste se gaseste un header Monitor.h.
Nu stiu de ce, dar daca il las pe acela (in care e definita o structura)
apar problemele de mai sus. Daca il scot imi apare eroarea:
...\_test\HeaderTest.h fatal error C1083: Cannot open include file "
Monitor.h"
Daca insa pun in directorul _test Monitor.h al meu (in care este definita
clasa mea Monitor) problemele nu mai apar... si trec toate testele.
Revin cu vesnica mea intrebare.... unde e problema?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/so/attachments/20061204/71896841/attachment.html
More information about the so
mailing list