EldoS | Feel safer!

Software components for data protection, secure storage and transfer

problem with linking with CBFS.lib

Posted: 11/22/2010 10:53:47
by Sangmin Lee (Standard support level)
Joined: 06/03/2009
Posts: 57


I have trouble with linking with CBFS.lib for my filesystem. Actually, Because I want my CBFS file system run as windows service, I'm developing my file system mounter service from visual studio 8.0 service template. But, I fail with following link error messages...

callbackFunction.obj : error LNK2028: unresolved token(0A00000F) "public: unsigned long __clrcall CbFsFileInfo::get_Attributes(void)" (?get_Attributes@CbFsFileInfo@@$$FQAMKXZ)을(를) "void __clrcall CbFsDeleteFile(class CallbackFileSystem *,class CbFsFileInfo *)" (?CbFsDeleteFile@@$$FYMXPAVCallbackFileSystem@@PAVCbFsFileInfo@@@Z) 함수에서 참조했습니다.

Above link error messages repeat for all CBFS functions..

Please help...
Posted: 11/22/2010 12:02:52
by Eugene Mayevski (Team)

I am wondering how cbfs.lib (which is unmanaged) can be refering to __clrcall method (which is indicator of managed code). So I think you somehow mixed managed and unmanaged code in improper way. Please review your project.

Sincerely yours
Eugene Mayevski
Posted: 11/22/2010 19:09:25
by Sangmin Lee (Standard support level)
Joined: 06/03/2009
Posts: 57

Yes.. You are right.. I think windows service code should be a managed code. When I generate new project from VC++ 8.0 service template, it generate build option with /clr:pure option by default, which means a managed code. Because of that, I had trouble linking my code with CBFS.lib. Now, I changed this option to /clr and build succeed. Any other option than /clr, the build fails.

However, I have new problem with /clr option. When I run service installer msi which was generated with VC 8.0, it causes following error and install fails..

error RA0000 : Attempt to load an unverifiable executable with fixups (IAT with more than 2 sections or a TLS section.) (Exception from HRESULT: 0x80131019)

Definitely, I think it is conflict between managed code (my service code) and CBFS.lib (unmanaged code). What can I do?

Thanks in advance.
Posted: 11/23/2010 00:09:16
by Eugene Mayevski (Team)

Windows service does not need to be managed code. Also if you want to write *managed* code, I'd suggest using C# for it's more simple architecture and readable style, unless you have specific reasons to use C++ with managed extensions.

Sincerely yours
Eugene Mayevski



Topic viewed 2393 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!