Using GDXIOAPI

Archive of Gamsworld Google Group
Post Reply
Archiver
User
User
Posts: 7876
Joined: 7 years ago

Using GDXIOAPI

Post by Archiver »



Hi there...

Since I was not able to make post-processing of obtained solution
reasonably quick in GAMS due to the issues with accessing specific
members of sets (cf. my previous post), I thought I might try using
GDXIOAPI. But...

I am familiar with Java, hence I chose NetBeans Java IDE. Although I
was able to put together the source files provided with GAMS in
subfolders of the "apifiles" folder, compilation of the first example
code always fails because certain libraries is missing: "gdxjava",
"optjava" and "gamsxjava" classes try to load external .dll files (.so
files on UNIX). To be specific, gdxjava loads gdxjni.dll, optjava
loads optjni.dll and gamsxjava loads gamsxjni.dll. However, these
files ARE NOT provided with GAMS, there are their C source codes only.

When I tried to compile those source codes (either in Visual Studio or
using MinGW/GCC), object files are created with at most some warnings,
but linking to DLL files always ends up with undefined references to
gdxFindSymbol, gdxgetElemText, etc.

What's wrong? Are there some special compilation parameters I need to
use?

Thanks for any help.

Best regards,
nvx
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Archiver
User
User
Posts: 7876
Joined: 7 years ago

Re: Using GDXIOAPI

Post by Archiver »



nvx,

The Java API files you are using require Java Native Interface DLLs. Here is
an example how to build the gdxjni.dll using the Microsoft C compiler on
Windows on the command line:

cl -I"C:\Program Files\Java\jdk1.5.0_14\include" -I"C:\Program
Files\Java\jdk1.5.0_14\include\win32" -I. -I"C:\Program
Files\GAMS23.0\apifiles\common" -LD gdxjni.c gdxcc.c -Fegdxjni.dll

I had gdxjni.c, gdxcc.c and gdxcc.h in the folder where I ran this command.
I hope this helps!

Best regards,
Lutz



----- Original Message -----
From: "nvx"
To: "gamsworld"
Sent: Wednesday, June 17, 2009 10:32 AM
Subject: Using GDXIOAPI


> >
> > Hi there...
> >
> > Since I was not able to make post-processing of obtained solution
> > reasonably quick in GAMS due to the issues with accessing specific
> > members of sets (cf. my previous post), I thought I might try using
> > GDXIOAPI. But...
> >
> > I am familiar with Java, hence I chose NetBeans Java IDE. Although I
> > was able to put together the source files provided with GAMS in
> > subfolders of the "apifiles" folder, compilation of the first example
> > code always fails because certain libraries is missing: "gdxjava",
> > "optjava" and "gamsxjava" classes try to load external .dll files (.so
> > files on UNIX). To be specific, gdxjava loads gdxjni.dll, optjava
> > loads optjni.dll and gamsxjava loads gamsxjni.dll. However, these
> > files ARE NOT provided with GAMS, there are their C source codes only.
> >
> > When I tried to compile those source codes (either in Visual Studio or
> > using MinGW/GCC), object files are created with at most some warnings,
> > but linking to DLL files always ends up with undefined references to
> > gdxFindSymbol, gdxgetElemText, etc.
> >
> > What's wrong? Are there some special compilation parameters I need to
> > use?
> >
> > Thanks for any help.
> >
> > Best regards,
> > nvx
>> > >
> >


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to gamsworld@googlegroups.com
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en
-~----------~----~----~----~------~----~------~--~---


Post Reply