- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a program system with a library. I can build the system OK using the following bat file
using the intel fortran 11.1
echo off
echo Building ospe3.exe
time /T
ifort ..\\AP.f ..\\model.f ..\\dbint.for ..\\Onspotsim.for ..\\..\\..\\LS\\lib1.lib ..\\kinetics.f /nologo /Zi /Od /I./GPR /I../../os /I../ap /I../mo /module:"./" /object:"./" /traceback /check:bounds /threads /dbglibs /exe:ospe3
So this works fine.However when I try to link the object files with the visual studio 2008 I get a number of lnk2019 errors
as seen below. First the link line from the buildlog and then the errors.
Linking...
Link /OUT:"Debug/OS PE3.exe" /INCREMENTAL:NO /NOLOGO /NODEFAULTLIB:"..\\..\\ls\\lib1.lib" /MANIFEST:NO /DEBUG /PDB:"Debug/OS PE3.pdb" /IGNOREIDL /IMPLIB:"\\\\GS0255\\USERS$\\ROMOENOI\\borouge\\Borouge 2\\OS PE\\OS PE3\\Debug\\OS PE3.lib" /qnoipo kernel32.lib /MACHINE:I386 "Debug/model.obj" "Debug/dbint.obj" "Debug/kinetics.obj" "Debug/OnspotSim.obj" "Debug/AP.obj"
OnspotSim.obj : error LNK2019: unresolved external symbol _LSOPTN@8 referenced in function _OS_STARTUP
OnspotSim.obj : error LNK2019: unresolved external symbol _LSSOL@88 referenced in function _OS_NLPSOLVER
OnspotSim.obj : error LNK2019: unresolved external symbol _DNRM2@12 referenced in function _OS_NLPSOLVER
Debug/OS PE3.exe : fatal error LNK1120: 3 unresolved externals
OS PE3 - 4 error(s), 0 warning(s)
What do I do wrong?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You will need to find out where these routines are supposed to be defined, and how they are called. If STDCALL is the correct convention, then perhaps all you need to do is add the library defining these routines to your link line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
check your defaults for the build environment.
do a search on gen-interfaces in these message for threads on that topic.
brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Best wishes
ivind
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is not a "generated interfaces" issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks again
Best wishes
ivind

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