[so] compilare tema4 windows

Andrei Stefanescu andreistef at gmail.com
Sun May 25 11:39:58 EEST 2008


Am o problema legata de compilare. Imi apare eroare la linkarea bibliotecii
partajate. Multumesc mult pentru orice ajutor!

Erorile intoarse de linker:

TestRW.obj : error LNK2019: unresolved external symbol "int __cdecl
GetNrConds(void)" (?GetNrConds@@YAHXZ) referenced in function "void __cdecl
TestRW(void)" (?TestRW@@YAXXZ)
TestStres.obj : error LNK2001: unresolved external symbol "int __cdecl
GetNrConds(void)" (?GetNrConds@@YAHXZ)
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)
TestRW.obj : error LNK2019: unresolved external symbol "void __cdecl
StopScrit(struct Monitor *)" (?StopScrit@@YAXPAUMonitor@@@Z) referenced in
function "unsigned long __stdcall Functie2A(void *)" (?Functie2A@@YGKPAX at Z)
TestRW.obj : error LNK2019: unresolved external symbol "void __cdecl
StartScrit(struct Monitor *)" (?StartScrit@@YAXPAUMonitor@@@Z) referenced in
function "unsigned long __stdcall Functie2A(void *)" (?Functie2A@@YGKPAX at Z)
Test4.obj : error LNK2019: unresolved external symbol "int __cdecl
Destroy(struct Monitor *)" (?Destroy@@YAHPAUMonitor@@@Z) referenced in
function "void __cdecl IesireDinWait4(void)" (?IesireDinWait4@@YAXXZ)
Test5.obj : error LNK2001: unresolved external symbol "int __cdecl
Destroy(struct Monitor *)" (?Destroy@@YAHPAUMonitor@@@Z)
Test6.obj : error LNK2001: unresolved external symbol "int __cdecl
Destroy(struct Monitor *)" (?Destroy@@YAHPAUMonitor@@@Z)
TestStres.obj : error LNK2001: unresolved external symbol "int __cdecl
Destroy(struct Monitor *)" (?Destroy@@YAHPAUMonitor@@@Z)
Test1.obj : error LNK2001: unresolved external symbol "int __cdecl
Destroy(struct Monitor *)" (?Destroy@@YAHPAUMonitor@@@Z)
Test2.obj : error LNK2001: unresolved external symbol "int __cdecl
Destroy(struct Monitor *)" (?Destroy@@YAHPAUMonitor@@@Z)
Test3.obj : error LNK2001: unresolved external symbol "int __cdecl
Destroy(struct Monitor *)" (?Destroy@@YAHPAUMonitor@@@Z)
Test1.obj : error LNK2019: unresolved external symbol "int __cdecl
Broadcast(struct Monitor *,int)" (?Broadcast@@YAHPAUMonitor@@H at Z) referenced
in function "void __cdecl Test1(void)" (?Test1@@YAXXZ)
Test4.obj : error LNK2001: unresolved external symbol "int __cdecl
Broadcast(struct Monitor *,int)" (?Broadcast@@YAHPAUMonitor@@H at Z)
Test6.obj : error LNK2001: unresolved external symbol "int __cdecl
Broadcast(struct Monitor *,int)" (?Broadcast@@YAHPAUMonitor@@H at Z)
Test1.obj : error LNK2019: unresolved external symbol "int __cdecl
Signal(struct Monitor *,int)" (?Signal@@YAHPAUMonitor@@H at Z) referenced in
function "void __cdecl Test1(void)" (?Test1@@YAXXZ)
Test3.obj : error LNK2001: unresolved external symbol "int __cdecl
Signal(struct Monitor *,int)" (?Signal@@YAHPAUMonitor@@H at Z)
Test4.obj : error LNK2001: unresolved external symbol "int __cdecl
Signal(struct Monitor *,int)" (?Signal@@YAHPAUMonitor@@H at Z)
Test5.obj : error LNK2001: unresolved external symbol "int __cdecl
Signal(struct Monitor *,int)" (?Signal@@YAHPAUMonitor@@H at Z)
Test6.obj : error LNK2019: unresolved external symbol "int __cdecl
Wait(struct Monitor *,int)" (?Wait@@YAHPAUMonitor@@H at Z) referenced in
function "void __cdecl Test6(void)" (?Test6@@YAXXZ)
Test1.obj : error LNK2001: unresolved external symbol "int __cdecl
Wait(struct Monitor *,int)" (?Wait@@YAHPAUMonitor@@H at Z)
Test3.obj : error LNK2001: unresolved external symbol "int __cdecl
Wait(struct Monitor *,int)" (?Wait@@YAHPAUMonitor@@H at Z)
Test4.obj : error LNK2001: unresolved external symbol "int __cdecl
Wait(struct Monitor *,int)" (?Wait@@YAHPAUMonitor@@H at Z)
Test5.obj : error LNK2001: unresolved external symbol "int __cdecl
Wait(struct Monitor *,int)" (?Wait@@YAHPAUMonitor@@H at Z)
Test5.obj : error LNK2019: unresolved external symbol "int __cdecl
Leave(struct Monitor *)" (?Leave@@YAHPAUMonitor@@@Z) referenced in function
"void __cdecl Test5(void)" (?Test5@@YAXXZ)
Test6.obj : error LNK2001: unresolved external symbol "int __cdecl
Leave(struct Monitor *)" (?Leave@@YAHPAUMonitor@@@Z)
Test1.obj : error LNK2001: unresolved external symbol "int __cdecl
Leave(struct Monitor *)" (?Leave@@YAHPAUMonitor@@@Z)
Test2.obj : error LNK2001: unresolved external symbol "int __cdecl
Leave(struct Monitor *)" (?Leave@@YAHPAUMonitor@@@Z)
Test3.obj : error LNK2001: unresolved external symbol "int __cdecl
Leave(struct Monitor *)" (?Leave@@YAHPAUMonitor@@@Z)
Test4.obj : error LNK2001: unresolved external symbol "int __cdecl
Leave(struct Monitor *)" (?Leave@@YAHPAUMonitor@@@Z)
Test5.obj : error LNK2019: unresolved external symbol "int __cdecl
Enter(struct Monitor *)" (?Enter@@YAHPAUMonitor@@@Z) referenced in function
"void __cdecl Test5(void)" (?Test5@@YAXXZ)
Test6.obj : error LNK2001: unresolved external symbol "int __cdecl
Enter(struct Monitor *)" (?Enter@@YAHPAUMonitor@@@Z)
Test1.obj : error LNK2001: unresolved external symbol "int __cdecl
Enter(struct Monitor *)" (?Enter@@YAHPAUMonitor@@@Z)
Test2.obj : error LNK2001: unresolved external symbol "int __cdecl
Enter(struct Monitor *)" (?Enter@@YAHPAUMonitor@@@Z)
Test3.obj : error LNK2001: unresolved external symbol "int __cdecl
Enter(struct Monitor *)" (?Enter@@YAHPAUMonitor@@@Z)
Test4.obj : error LNK2001: unresolved external symbol "int __cdecl
Enter(struct Monitor *)" (?Enter@@YAHPAUMonitor@@@Z)
Test5.obj : error LNK2019: unresolved external symbol "struct Monitor *
__cdecl Create(int,char)" (?Create@@YAPAUMonitor@@HD at Z) referenced in
function "void __cdecl Test5(void)" (?Test5@@YAXXZ)
Test6.obj : error LNK2001: unresolved external symbol "struct Monitor *
__cdecl Create(int,char)" (?Create@@YAPAUMonitor@@HD at Z)
Test1.obj : error LNK2001: unresolved external symbol "struct Monitor *
__cdecl Create(int,char)" (?Create@@YAPAUMonitor@@HD at Z)
Test2.obj : error LNK2001: unresolved external symbol "struct Monitor *
__cdecl Create(int,char)" (?Create@@YAPAUMonitor@@HD at Z)
Test3.obj : error LNK2001: unresolved external symbol "struct Monitor *
__cdecl Create(int,char)" (?Create@@YAPAUMonitor@@HD at Z)
Test4.obj : error LNK2001: unresolved external symbol "struct Monitor *
__cdecl Create(int,char)" (?Create@@YAPAUMonitor@@HD at Z)
../Test.exe : fatal error LNK1120: 13 unresolved externals

Asa arata headerele care exporta functiile:

#ifdef __cplusplus
extern "C" {
#endif

extern __declspec (dllexport) Monitor* Create(int conditions, char policy);
extern __declspec (dllexport) int Enter(Monitor *m);
extern __declspec (dllexport) int Leave(Monitor *m);
extern __declspec (dllexport) int Wait(Monitor *m, int cond);
extern __declspec (dllexport) int Signal(Monitor *m, int cond);
extern __declspec (dllexport) int Broadcast(Monitor *m, int cond);
extern __declspec (dllexport) int Destroy(Monitor *m);

#ifdef __cplusplus
}
#endif

#ifdef __cplusplus
extern "C" {
#endif

__declspec (dllexport) void StartCit(Monitor* m);
__declspec (dllexport) void StopCit(Monitor *m);
__declspec (dllexport) void StartScrit(Monitor* m);
__declspec (dllexport) void StopScrit(Monitor *m);
__declspec (dllexport) int GetNrConds();
__declspec (dllexport) Monitor* CreateRWMonitor();

#ifdef __cplusplus
}
#endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cursuri.cs.pub.ro/pipermail/so/attachments/20080525/37c23fe3/attachment-0001.htm 


More information about the so mailing list