|
-
August 31st, 1999, 02:02 PM
#1
Disabling LIB file generation
My project is an EXE, and there is __declspec(dllexport) thus after linking a lib file is generated which takes a long time. Since I do not need this LIB file, I would like to disable it. What is the linker option that I should use to achieve this.
Creating library .\Debug/myproject.lib and object .\Debug/myproject.exp
-
August 31st, 1999, 02:32 PM
#2
Re: Disabling LIB file generation
Hi,
I found a solution and I thought I would share it with you guys. In the MSDN documentation it says that if in the project there exists an EXP file, the linker assumes that the .LIB exists and hence does not re-generate. So what I made was to create a dummy .EXP in the source code directory using the notepad and explain in it why is it there, and then add it to the project. Hence the compiler will not generate the LIB file except in case of re-build all.
Thanks,
Victor.
-
August 31st, 1999, 03:43 PM
#3
Re: Disabling LIB file generation
Including __declspec(dllexport) in your source code causes the compiler to attempt to define symbols (functions or variable) that can be
used by others. The .lib file that is being generated tells these clients the offset into the file to find the symbols. By not generating the .lib file
nobody will be able to use the exported symbols. So if you aren't going to generate the .lib file, why are you exporting symbols.
I think the simple answer to your question is stop exporting symbols. If there are no exported symbols, the library will not be created. You
will also be able to get rid of this .exp hack.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|