cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Raistmer
Adept II

[SOLVED]Link error - read function unresolved

"

Linking...

Creating library ..\..\..\..\bin/ap_5.05_win_x86_SSE3_BROOK.lib and object ..\..\..\..\bin/ap_5.05_win_x86_SSE3_BROOK.exp

ap_fold1.obj : error LNK2019: unresolved external symbol "public: void __thiscall brook::StreamData::_read(void const *,char const *)" (?_read@StreamData@brook@@QAEXPBXPBD@Z) referenced in function "public: void __thiscall brook::Stream::_read(void const *,char const *)" (?_read@?$Stream@M@brook@@QAEXPBXPBD@Z)

..\..\..\..\bin/ap_5.05_win_x86_SSE3_BROOK.exe : fatal error LNK1120: 1 unresolved externals

"

Something wrong in project setting perhaps (but what...) ? I can build SDK examples w/o errors, but...

 EDIT:

KB25 from Knowledge base could apply to this case cause I use x64 system for building x86 program, but:

1) only this read function failed to link, no errors from stream constructor and destructor

2) SDK example builds just OK on the same host.

 



0 Likes
3 Replies
gaurav_garg
Adept I

Are you linking with brook.lib?

0 Likes

yes.

And it stays first in Additional Dependencies property (when it was last in list all was the same).

 EDIT: to be sure I removed brook.lib from list and relink:

 

..\..\..\..\bin/ap_5.05_win_x86_SSE3_BROOK.exe : fatal error LNK1120: 38 unresolved externals

List of errors was too long (38 instead of just one). So i'm sure brook.lib participate in link....

 



0 Likes

Ok, I found the cause of error.

One of BOINC include files contains

#define read _read

statement that caused incorrect function call after preprocessing.

#undef read

statement in the beginning of cpp file with brook calls repaired all.

 Thank you for help.

 



0 Likes