久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

有.dll文件和頭文件時如何制作.lib文件

How to make a .lib file when have a .dll file and a header file(有.dll文件和頭文件時如何制作.lib文件)
本文介紹了有.dll文件和頭文件時如何制作.lib文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我正在嘗試在 Visual Studio 中創建一個能夠訪問已存在的 .dll 文件的應用程序.我需要應用程序來調用例程.我也有一個已經存在的頭文件.

I am trying to create an application in visual studio that will be able to access a .dll file that already exists. I need the application to call up routines. I also have a header file that already exists.

我一直在網上研究,發現我需要創建一個 .lib 文件.在這里查看類似問題時,我找到了一個鏈接:http://support.microsoft.com/kb/131313但是,我無法按照指示進行操作.

I have been researching on the internet and have found that I need to create a .lib file. Looking at similar questions on here I found a link: http://support.microsoft.com/kb/131313 I cannot however follow the directions.

鏈接中的信息說要制作一個 DEF 文件(我在別處讀到這需要編譯為同名的 DLL,但不確定該名稱是什么,與 .dll 文件同名?).但我不明白第一個方向,即使用 DUMPBIN/EXPORTS".然后我需要存根"函數,然后處理 .OBJ 文件(我不知道這些文件是什么).

The information in the link says to make a DEF file ( I read elsewhere that this needs to be compiled as a DLL with the same name, but not sure what that name is, the same name as the .dll file?). But I do not understand the first direction, to 'Use DUMPBIN /EXPORTS'. I then need to 'stub out' functions, and then something to do with .OBJ files (I do not know what these files are).

是否有與上面的鏈接類似的易于遵循的分步說明?

Are there any step-by-step directions, similar to the link above, that are easy to follow?

推薦答案

您將需要 Microsoft Visual C++ 2010 Express(或任何其他 MSVC 命令行工具來源)和您的 DLL.

You're going to need Microsoft Visual C++ 2010 Express (or any other source of MSVC command line tools), and your DLL.

步驟:

  1. dumpbin/EXPORTS yourfile.dll >yourfile.exports
  2. 將所需函數的名稱從 yourfile.exports 粘貼到新的 yourfile.def 文件中.在此文件的頂部添加一行帶有 EXPORTS 字樣的行.
  3. VCin 目錄(lib.exe 和其他編譯工具所在的目錄)運行以下命令.
  1. dumpbin /EXPORTS yourfile.dll > yourfile.exports
  2. Paste the names of the needed functions from yourfile.exports into a new yourfile.def file. Add a line with the word EXPORTS at the top of this file.
  3. Run the following commands from VCin directory (the one where lib.exe and other compile tools reside).

 

 vcvars32.bat

 lib /def:yourfile.def /out:yourfile.lib

或用于 x64 構建

 lib /def:yourfile.def /machine:x64 /out:yourfile64.lib

您應該生成兩個文件:yourfile.libyourfile.exp

You should get two files generated: yourfile.lib and yourfile.exp

這篇關于有.dll文件和頭文件時如何制作.lib文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How can I read and manipulate CSV file data in C++?(如何在 C++ 中讀取和操作 CSV 文件數據?)
In C++ why can#39;t I write a for() loop like this: for( int i = 1, double i2 = 0; (在 C++ 中,為什么我不能像這樣編寫 for() 循環: for( int i = 1, double i2 = 0;)
How does OpenMP handle nested loops?(OpenMP 如何處理嵌套循環?)
Reusing thread in loop c++(在循環 C++ 中重用線程)
Precise thread sleep needed. Max 1ms error(需要精確的線程睡眠.最大 1ms 誤差)
Is there ever a need for a quot;do {...} while ( )quot; loop?(是否需要“do {...} while ()?環形?)
主站蜘蛛池模板: 成人夜晚看av | 在线免费视频一区 | 国内成人免费视频 | 色综合视频 | 亚洲国产精品久久久久婷婷老年 | av香港经典三级级 在线 | 久久99精品久久久久久国产越南 | 日本久久www成人免 成人久久久久 | 亚洲精品免费视频 | 免费在线观看一区二区三区 | 国产精品1区2区3区 一区中文字幕 | 俺去俺来也www色官网cms | 欧美日韩免费 | 中文字幕av亚洲精品一部二部 | 亚洲精品中文字幕av | 九色在线观看 | 国产1区2区在线观看 | 97色在线观看免费视频 | 自拍 亚洲 欧美 老师 丝袜 | 国产日韩欧美二区 | 日本免费视频 | 国产成人一区二区三区电影 | 日韩av免费看 | 国产精品精品久久久 | 超碰男人天堂 | 亚洲区一区二 | 日韩一区二区福利 | 欧美一级片在线播放 | 91国内外精品自在线播放 | 成人激情视频免费在线观看 | 99热热热热| 91精品国产一区二区三区蜜臀 | 国产精品一区二区三区在线 | 国产精品视频播放 | 国产免费色| 欧美日日日日bbbbb视频 | 欧美激情国产精品 | 久久久99精品免费观看 | 天天干天天玩天天操 | 久久综合伊人一区二区三 | 亚洲视频在线一区 |