[OS] Linking with OS API

pete ppjanes at gmail.com
Sun Mar 23 03:37:26 EDT 2008


Dear all,

I am planning to write global optimization solvers which use OS to
read in
.nl model instances. I have built OS on my Linux machine, but have
been
having difficulties including/linking to the OS API. Say for instance

#include <stdio.h>
#include "OSInstance.h"
#include "OSnLNode.h"
#include "OSnl2osil.h"
#include "DefaultSolver.h"
#include "IpoptSolver.h"
#include <vector>
#include <math.h>

using namespace std;

int main(int argc, char **argv) {
  OSInstance *osinstance;
  OSnl2osil *nl2osil = NULL;
  DefaultSolver *solver = NULL;

  osinstance = new OSInstance();
}

it seems that not only do I have to specify the include path to the
"include"
folder created after installation, but a host of other folders
associated with
other COIN-OR or ThirdParty projects. In addition I compile errors
would
come up due to #error, preprocessor statements, forcing me to define
variables
such as -DHAVE_MATH_H -DHAVE_TIME_H.  Similar difficulties were
encountered
during linking.

Is it normal to do this in order to get it to work? Is there a better
way?

I am sure I have done something silly. Could any of you point me to a
good tutorial
or example on using the COIN-OS API. I have been reading the User's
Manual but it
did not cover this aspect.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Optimization Services (OS)" group.
To post to this group, send email to optimizationservices at googlegroups.com
To unsubscribe from this group, send email to optimizationservices-unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/optimizationservices?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the OS mailing list