• Advertisement

Archived

This topic is now archived and is closed to further replies.

Problems with DLL

This topic is 5712 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve got a problem with this DLL. There are about 60 functions in it, but not all of them work. When I use the ''std::wstring'' type as a parameter in one of the functions I get this error when I use it: - unresolved external symbol "bool __cdecl TASFileDup(class std::basic_string,class std::allocator > const &)" - Why? I know some of the other functions work. This might not be enough info to answer my question, but I don''t know what more to tell you. K.

Share this post


Link to post
Share on other sites
Advertisement
Yes, all of the functions are exported using ''__declspec (dllexport)''. I am sure there is some aspect of creating a DLL I haven''t grasped. I declare all of the std::wstring parameters as const. Should this have something to do with it? I was also wondering for a while if it''s impossible to pass references to a DLL function, but I''m sure thats not the reason.

One of the functions is declared like this:

__declspec (dllexport) bool TASFileExists( const std::wstring& strFileName );

Share this post


Link to post
Share on other sites
Hmm... It''s not a compilation error, it''s linker error (sounds like your code is compiling fine). Did you include the Lib file in the project that uses the DLL?

Share this post


Link to post
Share on other sites
You are declaring your functions as __declspec(dllimport) in client code, aren''t you?

Share this post


Link to post
Share on other sites

  • Advertisement