Microsoft® Visual C++ and 'C' Runtime Library

Top  Previous  Next

Please note: If you are building a 32-bit or 64-bit Unicode application,  the import libraries are named dtwain32u.lib and dtwain64u.lib, respectively.  If you're building a 64-bit ANSI application, the import library is named dtwain64.lib.

 

Your application must use the DTWAIN32.LIB import library.

 

The import libraries for Visual C++ 5.0 are found in the Visual C++\5.0\Lib subdirectory of your DTWAIN installation.  The import libraries for Visual C++ 6.0 and Visual C++ Net, and Visual Studio 2003, 2005, and 2010 are found in the Visual C++\6.0\Lib subdirectory.

 

Remember to add the import library to your application's project, or else you will get linker errors.

 

Below is an illustration of adding the import library in your project settings:

linker

 

The library is added in the "Link" tab of your project settings.  The library must be found in your "include" path.  This can be set by going to the "Tools" "Options" menu and setting the Libraries directory.

 

Another method of adding the library is by including it in your project workspace tree.  Here is an illustration.

 

linker2

 

 

 

Visual Studio 2002 and above:
 

For Visual Studio 2002 and above, open the Properties for your project, go to the Linker section, select Input, and specify the library in the "Additional Dependencies" field as below:

 

clip0024

 

The setting above assumes that your Visual C++ settings for your Library Files will look in the directory where dtwain32.lib is stored.  If not, you will need to do either of the following:

 

specify the full path name in the "Additional Dependencies" field.  For example, "c:\dtwain_installation\lib\dtwain32.lib", instead of "dtwain32.lib",

 

or

 

Set where Visual C++ looks for its libraries under "Tools -> Options -> Projects -> VC++ Directories".  Then choose "Library Files" from the "Show directories from" combo box as shown below, and add the directory where the dtwain32.lib file is stored.  Then you can just specify dtwain32.lib in the "Additional Dependencies" of your Project Settings, instead of giving the full path name.

 

clip0023

 

If you using another C++ compiler that cannot generate import libraries, see the next section, Using DTWAIN without an import library.