<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3157" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007>Hi:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=067411500-27112007>Recently I have 
tried to create a Fortran interface to use CLP from Visual Fortran. I am trying 
to use some advise from Matthew Saltzman, and some experience that I have on 
using Lindo and CPLEX with the same purpose. However, I am having some trouble. 
I would like to show you what I have done and where my problem is in order to 
get some help from you.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=067411500-27112007>1. I have created a 
CLP_interface like this:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007>----------------------------------------------------------------------------------------------------</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MODULE 
clp_ifaces<BR>!<BR>!&nbsp; Interfaces to the CLP Version 6.0 functions&nbsp; for 
use<BR>!&nbsp;&nbsp; with&nbsp;<SPAN class=015092717-27112007>C</SPAN><SPAN 
class=015092717-27112007>ompaq</SPAN> Visual Fortran&nbsp;<SPAN 
class=015092717-27112007>6.6</SPAN> (<SPAN class=015092717-27112007>C</SPAN>VF) 
<BR>!<BR>!&nbsp; Written By:&nbsp; Jose L. 
Ceciliano&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
On:&nbsp; 20 Nov 2007<BR>!<BR>!<BR>!&nbsp; Allow no implicit 
declarations<BR>!<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; implicit 
none<BR>!<BR>!&nbsp; CLP functions' interfaces<BR>!<BR>!&nbsp;&nbsp;&nbsp;&nbsp; 
Load the problem<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
INTERFACE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function Clp_loadProblem( 
model,&nbsp; numcols, numrows, start, &amp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; 
&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
column, valuem, collb, colub, obj, &amp;<BR>&nbsp; 
&amp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
rowlb, rowub)<BR>!DEC$ ATTRIBUTES stdcall, alias:'_Clp_loadProblem@48' :: 
Clp_loadProblem<BR>!DEC$ ATTRIBUTES value :: numcols, numrows<BR>!DEC$ 
ATTRIBUTES reference :: start, column, valuem, collb<BR>!DEC$ ATTRIBUTES 
reference :: colub, obj, rowlb, rowub, model<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
use symtypes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; integer(IL) :: 
Clp_loadProblem<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; integer(IL), intent(in) :: 
numcols, numrows<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; integer(IL), intent(in) :: 
start(*), column(*)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; real(RD), intent(in) :: 
valuem(*), collb(*), colub(*)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; real(RD), 
intent(in) :: obj(*), rowlb(*), rowub(*)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
character(15), intent(in) :: model<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end 
function Clp_loadProblem<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END 
INTERFACE</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=067411500-27112007>! 
<BR>!&nbsp;&nbsp;&nbsp;&nbsp; Read an mps file from the given 
filename<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
INTERFACE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function Clp_readMps( model, 
filename, keepNames, ignoreErrors)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use 
symtypes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; integer(IL) :: 
Clp_readMps<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; integer(IL), intent(in) :: 
keepNames, ignoreErrors<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; character(15), 
intent(in) :: model, filename<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end function 
Clp_readMps<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END 
INTERFACE<BR>!<BR>!&nbsp;&nbsp;&nbsp;&nbsp; Primal column 
solution<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
INTERFACE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function 
Clp_primalColumnSolution(model)<BR>!DEC$ ATTRIBUTES stdcall, 
alias:'_Clp_primalColumnSolution@8' :: Clp_primalColumnSolution<BR>!DEC$ 
ATTRIBUTES reference :: model<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use 
symtypes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; integer(IL) :: 
Clp_primalColumnSolution<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; character(15), 
intent(in) :: model<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end function 
Clp_primalColumnSolution<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END 
INTERFACE<BR>!<BR>!&nbsp;&nbsp;&nbsp;&nbsp; Objective 
value<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
INTERFACE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function 
Clp_objectiveValue(model)<BR>!DEC$ ATTRIBUTES stdcall, 
alias:'_Clp_objectiveValue@8' :: Clp_objectiveValue<BR>!DEC$ ATTRIBUTES 
reference :: model<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use 
symtypes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; integer(IL) :: 
Clp_objectiveValue<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; character(15), intent(in) 
:: model<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end function 
Clp_objectiveValue<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END 
INTERFACE<BR>!<BR>!&nbsp;&nbsp;&nbsp;&nbsp; Dual algorithm - see 
ClpSimplexDual.hpp for method<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
INTERFACE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function Clp_dual(model, 
ifValuesPass)<BR>!DEC$ ATTRIBUTES stdcall, alias:'_Clp_loadProblem@12' :: 
Clp_loadProblem<BR>!DEC$ ATTRIBUTES value :: ifValuesPass<BR>!DEC$ ATTRIBUTES 
reference :: model<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; use 
symtypes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; integer(IL) :: 
Clp_dual<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; integer(IL) :: 
ifValuesPass<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; character(15), intent(in) :: 
model<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end function 
Clp_dual<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END 
INTERFACE<BR>!<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END MODULE 
clp_ifaces</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007>----------------------------------------------------------------------------</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=067411500-27112007>2. I have created my 
project defining in settings the following information:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=067411500-27112007>a) In C/C++ 
preprosessor/additional include directories:&nbsp;&nbsp;&nbsp;&nbsp; 
C:\coin-win32-msvc6-24Feb06\include</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=067411500-27112007>b) In 
Link/Object/library modules:&nbsp; 
C:\coin-win32-msvc6-24Feb06\lib\*.lib</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=067411500-27112007>However, when I try 
to&nbsp;link my project I get the following errors:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV>
<DIV><SPAN class=067411500-27112007><FONT face=Arial size=2>prueba1.obj : error 
LNK2001: unresolved external symbol </FONT><A title=mailto:_Clp_loadProblem@48 
href="mailto:_Clp_loadProblem@48"><FONT face=Arial 
size=2>_Clp_loadProblem@48</FONT></A><BR><FONT face=Arial size=2>prueba1.obj : 
error LNK2001: unresolved external symbol </FONT><A title=mailto:_CLP_DUAL@12 
href="mailto:_CLP_DUAL@12"><FONT face=Arial 
size=2>_CLP_DUAL@12</FONT></A><BR><FONT face=Arial size=2>prueba1.obj : error 
LNK2001: unresolved external symbol </FONT><A title=mailto:_Clp_objectiveValue@8 
href="mailto:_Clp_objectiveValue@8"><FONT face=Arial 
size=2>_Clp_objectiveValue@8</FONT></A><BR><FONT face=Arial size=2>prueba1.obj : 
error LNK2001: unresolved external symbol </FONT><A 
title=mailto:_Clp_primalColumnSolution@8 
href="mailto:_Clp_primalColumnSolution@8"><FONT face=Arial 
size=2>_Clp_primalColumnSolution@8</FONT></A><BR><FONT face=Arial 
size=2>Debug/prueba1.exe : fatal error LNK1120: 4 unresolved externals<BR>Error 
executing link.exe.</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=067411500-27112007>prueba1.exe - 5 
error(s), 1 warning(s)<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007>-------------------------------------------------------------------</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=067411500-27112007>I think the problem 
is with the Clp.lib file since it does not have any @number with its functions, 
instead it has @ ??</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT size=2><SPAN class=067411500-27112007>What could it 
be the error? What I would need to do that I am not doing now? </SPAN><SPAN 
class=067411500-27112007>Thanks in advance.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=067411500-27112007>Kind 
regards,</SPAN></FONT></DIV>
<DIV><SPAN class=067411500-27112007><FONT face=Arial 
size=2>Jose</FONT></DIV></SPAN>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=067411500-27112007></SPAN></FONT>&nbsp;</DIV></DIV></BODY></HTML>