[so] Intrebare legata de linkare
Cristi B
cristib84 at yahoo.com
Mon Dec 4 20:20:11 EET 2006
Si eu primesc erori de genul LNK2019 si LNK2001:
TestRW.obj : error LNK2019: unresolved external symbol "int __cdecl GetNrConds(v
oid)" (?GetNrConds@@YAHXZ) referenced in function "void __cdecl TestRW(void)" (?
TestRW@@YAXXZ)
TestStres.obj : error LNK2001: unresolved external symbol "int __cdecl GetNrCond
s(void)" (?GetNrConds@@YAHXZ)
Imi genereaza .dll-urile.
Iar Monitor la mine e un struct, de fapt am pastrat aceeasi metoda care a mers pe Linux:
am facut un:
struct sMonitor {...}
si apoi un:
typedef struct sMonitor Monitor;
Chiar nu inteleg...
Octavian Purdila <tavi at cs.pub.ro> wrote: On Monday 04 December 2006 16:48, Andreea Fulger wrote:
> 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?
Defineste monitorul cu struct Monitor in loc de class Monitor.
(din pacate testele au aceasta limitare)
tavi
_______________________________________________
so mailing list
so at cursuri.cs.pub.ro
http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/so/attachments/20061204/d8b118b4/attachment.htm
More information about the so
mailing list