- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
Does anyone have experience linking Intel Fortran and Knitro? I keep getting the error LNK2019 unresolved extern symbol. The paths are properly set but the error is still there.
Pablo
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The recently released Knitro-8 for Windows-64 comes with a Fortran example, which works fine when compiled with the current Intel compiler for Windows.
cl /MT /c knitro_fortran.c
ifort exampleProgram.f problemQCQP.f knitro_fortran.obj knitro800.lib
The resulting program ran fine.
Please provide details on the problems that you ran into. In particular, how did you compile and link, and which function was flagged as an unresolved symbol?
cl /MT /c knitro_fortran.c
ifort exampleProgram.f problemQCQP.f knitro_fortran.obj knitro800.lib
The resulting program ran fine.
Please provide details on the problems that you ran into. In particular, how did you compile and link, and which function was flagged as an unresolved symbol?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply. I am using Microsoft Visual Studio 2008, and Intel Fortran 11.1.038 in Windows 7 (64 bit).
The functions reported as unresolved symbol are:ktrF_open_instance,ktrF_load_param_file,ktrF_init_problem,ktrF_solve,ktrF_close_instance.
Any suggestion is welcomed.
Pablo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to include the file knitro_fortran.c in your build. This file contains Fortran callable wrapper functions that in turn call the routines in the Knitro library.
See the commands used to build the example in my first reply.
See the commands used to build the example in my first reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Even after including the knitro_fortran.obj, I get the same error. Am I forgetting to set a path? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Intel Fortran compiler normally upper-cases external symbols on Win-64. You do not provide information on how you built the .OBJ files and which compiler options were used, so I do not know why the missing externals are not all upper-case. Check if your project options are messing things up as to name decoration.
The PATH environment variable does not affect which objects are processed by the linker.
The PATH environment variable does not affect which objects are processed by the linker.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page