kkkttt 发表于 2015-10-27 08:03

Windows系统下静态链接 IMSL CNL 函数库

Statically Linking the IMSL C Library on Windows

To setup a sample project using the IMSL C Numerical Library static
libraries, follow the steps outlined below. These steps are based on
the IMSL C Numerical Library version 7.0 for Microsoft Visual
Studio 2008.

1) Start the Microsoft Visual Studio 2008 Developer Environment

2) If you have not already defined a Solution Workspace for your
application, you must do so before proceeding. Close all Solutions
and choose File ==> New ==> Project. Under the language Visual C++,
select Win32. Under Templates, choose "Win32 Console Project" as
the project type. Fill in the name of the project and select the desired
location at the bottom of the Dialog box and click OK. In the Win32
Application Wizard select "Application Settings" and choose the option
"Empty Project" then click Finish.

3) In the main menu, select Project ==> Add Existing Item... and
browse to the file:

<VNI_DIR>\imsl\cnl700\<ENV>\examples\validate\cmath.c

and add it to the project.

4) Click on Project ==> Properties ==> Configuration Properties ==>
C/C++ ==> General and add the directory:

<VNI_DIR>\imsl\cnl700\<ENV>\include

to the "Additional Include Directories" list and then click OK.

5) Click on Project ==> Properties ==> Configuration Properties ==>
C/C++ ==> Preprocessor , select Preprocessor definitions:

Select <Edit...> from the pulldown and add

IMSL_STATIC

Click OK and then Apply

6) Under Linker ==> General, add the directory:

<VNI_DIR>\imsl\cnl700\<ENV>\lib

to the "Additional Library Directories" list and then click Apply

7) Under Linker ==> Input , select Additional Dependencies

Select <Edit...> from the pulldown and add

imslcmath_imsl.lib
imslcstat_imsl.lib
lmgr_md.lib
libcrvs_md.lib
libsb_md.lib
libFNPload.lib
netapi32.lib
advapi32.lib
comctl32.lib
wsock32.lib
oldnames.lib

Click OK and then Apply

8) Under Linker ==> Input, select Ignore Specific Default Libraries
and add:

libcmt.lib

Click OK

9) You should be able to build the Solution and run the program.
页: [1]
查看完整版本: Windows系统下静态链接 IMSL CNL 函数库