NO

Author Topic: The IDE haven't automatic include the *.lib when link dll to exe  (Read 2269 times)

ValerĂ³n

  • Guest
When I'm trying to compile Petzold's code in chapter 21 which is about DLL, I got the problem.

I follow the guideline in the book, first create a new empty dll project without wizard, namely edrlib, manual add the source and header file by copying the code from the book into both source and header files. Then I try compile the dll, it works.
Second, I create a new empty win32 exe project without wizard too, add it to the same workspace as the dll project, set them lay out in the same directory, just as how the book told me to, i.e \destop\test. Then add the source by copy the codes as previous project. I set the win32 project to be active. And the project dependence has been set too.
But finally when I'm going to build the win32 project or the whole workspace, the POLINK report error "Unresolved external symbol '_EdrCenterTextW'".
The error bother me for hours.
After I try set the library for the win32 exe project to include the project path \desktop\test and explicitly add edrlib.lib to the library list of the win32 exe project, it works. The linker error gone and the exe got successfully compiled.

Is this a bug or if I can't follow the guideline in the book for pelles c to setup a win32 project which depend on a dll project??
« Last Edit: April 06, 2009, 02:42:47 PM by ValerĂ³n »