Skip to main content
gamedev.net
🔒 Locked

Problems with DLL

Started by Kotumo May 29, 2002 at 4:27 PM 3 replies 300+ views
Original Post
Kotumo
Kotumo
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.
Solo
Solo
Was the function exported?
// Ryan
Kotumo
Kotumo
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 );
Solo
Solo
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?
// Ryan
IndirectX
IndirectX
You are declaring your functions as __declspec(dllimport) in client code, aren''t you?
---visit #directxdev on afternet <- not just for directx, despite the name

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.