Archived Forums V. Sign in to vote. Hi, I've created a. Monday, May 29, PM. Tuesday, May 30, PM. Wilson 0. What is your problem. Just create a new file with the Extension.
DEF and add it to the project. Download Microsoft Edge More info. Contents Exit focus mode. Is this page helpful? Please rate your experience Yes No. Any additional feedback? Submit and view feedback for This product This page.
View all page feedback. Just this:. Nothing more. I guess that means I'm not exporting anything. But, that's exactly what I'm trying to do. How do I do it? Why not specify creation of an implib in your project and recompile. Here is the relevant info. This will export everything, and your other projects can link against the implib a. If, on the other hand, you want to avoid exporting everything in the DLL, then you need to create an API preferably C for compatibility with non-Microsoft compilers, if this is even a case and then export only those functions.
This can be done by creating a small text file, renaming it. This file's format is well-documented in MSDN but the minimum you need is something like this:. The above would require using the exact names of the functions in the code. However your exported names can be more 'readable' if you write it like this:. For more information on the syntax see here. After repeatedly coming across this problem for a couple of years I've today found a solution.
It's a little hacky, but it actually might be the best possible way with Visual Studio. Since you don't want to export EVERY possible symbol especially since your DLL may include large static libraries itself , and you can't edit the files with symbols you want to have available for me it's because they're 3rd party libraries which must be statically linked to follow their usage pattern , and DEF is the best solution.
OK, we get a lot of linker errors Now go to the "Output" tab, and notice that within the text of the output is the symbol names at the end of each linker error line:. We can create a little script with takes the last 'word' of every line, takes off the brackets, and then put that in your DEF file. And it works! When I use Lib2A for converting, my. Can this be correct?
Yes, running gendef. It created. From that I run dlltool. I copied both tools to my dll folder to use it there.
0コメント