Steps in including lib file and dll built in unicode
-
Hi, This is my situation: I have created a project (MFC) which depends on a dll with a lib file (non-unicode). Everything compiles fine (for both debug and release). But I have to build my project again in UNICODE. I have corrected everything for unicode build (as to my source code). I have now a dll and lib file built in unicode. How to I add that dll and lib file to my project? I keep getting unresolved external symbol errors for Debug Unicode and Release Unicode(I think the compiler is looking for a specific function from the dll built in unicode. I would really appreciate it if you could tell me the steps in adding my unicode lib file to the project(not just the simple right click on project and add file, that still doesn't work).:sigh::(( Thanks, Waxie -- modified at 23:57 Thursday 19th January, 2006
-
Hi, This is my situation: I have created a project (MFC) which depends on a dll with a lib file (non-unicode). Everything compiles fine (for both debug and release). But I have to build my project again in UNICODE. I have corrected everything for unicode build (as to my source code). I have now a dll and lib file built in unicode. How to I add that dll and lib file to my project? I keep getting unresolved external symbol errors for Debug Unicode and Release Unicode(I think the compiler is looking for a specific function from the dll built in unicode. I would really appreciate it if you could tell me the steps in adding my unicode lib file to the project(not just the simple right click on project and add file, that still doesn't work).:sigh::(( Thanks, Waxie -- modified at 23:57 Thursday 19th January, 2006
Check like this...
#ifdef _UNICODE
#pragma comment(lib, "your_unicode_lib.lib")
#else
#pragma comment(lib, "your_other_lib.lib")
#endif
This will link to the appropriate library.
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose:
-
Check like this...
#ifdef _UNICODE
#pragma comment(lib, "your_unicode_lib.lib")
#else
#pragma comment(lib, "your_other_lib.lib")
#endif
This will link to the appropriate library.
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose:
-
stdafx.h This is where I do it. This is where you should do it too. But it depends on your application and your needs.
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose:
-
Hi, This is my situation: I have created a project (MFC) which depends on a dll with a lib file (non-unicode). Everything compiles fine (for both debug and release). But I have to build my project again in UNICODE. I have corrected everything for unicode build (as to my source code). I have now a dll and lib file built in unicode. How to I add that dll and lib file to my project? I keep getting unresolved external symbol errors for Debug Unicode and Release Unicode(I think the compiler is looking for a specific function from the dll built in unicode. I would really appreciate it if you could tell me the steps in adding my unicode lib file to the project(not just the simple right click on project and add file, that still doesn't work).:sigh::(( Thanks, Waxie -- modified at 23:57 Thursday 19th January, 2006
Another way to do this is to create a separate configuration for unicode debug. In that configuration link your unicode libs and that will work. Similar can be done for Unicode Release. Regards,