Eduardo,
I just installed g++ on my Windows 7 machine. This is the version I have now:
bash-2.02$ g++ --version
egcs-2.91.57
With that I did
g++ -o example1.exe example1.cpp …/gdx/gdxco.cpp …/gdx/gdxcc.c -I ./gdx -I…/common
and that worked. I tried to follow the error you got (…/gdx/gdxcc.c: In function ‘void* loadSym(HINSTANCE__, const char, char**)’: …/gdx/gdxcc.c:456: error: invalid conversion from ‘int ()()’ to 'void’), but if I look at line 456 in gdxcc.c that is not in the function loadSym. And when I look at the function loadSym I cannot find the conversion that is mentioned in the error message. Are you using the most recent version of GAMS (23.7) and the appropriate API files?
Best,
Lutz
On 7/21/2011 10:24 AM, Eduardo wrote:
Hi Lutz,
Thanks for your answer. I realize that I should have given more
details… I’m working on Windows 7 and using the mingw-g++ compiler.
It’s included in the Qt4, which I eventually want to use to build a
GUI that can export/import GDX files.
I’m using both of the following commands:
mingw32-g++ -o example1.out -m32 example1.cpp …/gdx/gdxco.cpp …/gdx/
gdxcc.c -I…/gdx -I…/common -ldl
mingw32-g++ example1.cpp …/gdx/gdxco.cpp …/gdx/gdxcc.c -I…/gdx -I…/
common
And I’m getting the following errors and warnings:
…/gdx/gdxcc.c: In function ‘void* loadSym(HINSTANCE__, const char,
char**)’:
…/gdx/gdxcc.c:456: error: invalid conversion from ‘int ()()’ to
'void’
…/gdx/gdxcc.c: In function ‘int XLibraryLoad(const char*, char*,
int)’:
…/gdx/gdxcc.c:538: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:539: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:540: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:541: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:547: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:548: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:561: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:562: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:563: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:564: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:565: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:566: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:567: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:568: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:569: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:570: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:571: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:572: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:573: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:574: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:575: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:576: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:577: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:578: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:579: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:580: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:581: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:582: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:583: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:584: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:585: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:586: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:587: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:588: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:589: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:590: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:591: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:592: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:593: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:594: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:595: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:596: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:597: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:598: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:599: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:600: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:601: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:602: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:603: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:604: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:605: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:606: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:607: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:608: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:609: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:610: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:611: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:612: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:613: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:614: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:615: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:616: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:617: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:618: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:619: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:620: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:621: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:622: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:623: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:624: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:625: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:626: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:627: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:628: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:629: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:630: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:631: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:632: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:633: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:634: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:635: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:636: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:637: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:638: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:639: warning: deprecated conversion from string
constant to ‘char *’
…/gdx/gdxcc.c:640: warning: deprecated conversion from string
constant to ‘char *’
Thanks,
Eduardo
On Jul 21, 4:19 am, Lutz Westermann wrote:
Eduardo,
I don’t know on what platform you are working on, but here is what I did
on 32bit Unix to compile example1.cpp with g++:
g++ -o example1.out -m32 example1.cpp …/gdx/gdxco.cpp …/gdx/gdxcc.c
-I…/gdx -I…/common -ldl
Does this help?
Best regards,
Lutz
On 7/19/2011 6:12 PM, Eduardo wrote:
Hi,
I am interested in building a tool in c++ that has GDX reading and
writing capabilities. I tried to compile the examples that are
provided in the “apifiles” folders with g++ but I haven’t had any
luck. Are those files only compatible with Visual C++?
Thanks in advance,
Eduardo
–
Lutz Westermann LWesterm...@gams.com
GAMS Development Corporation GAMS Software GmbH
1217 Potomac St. NW, Eupener Str. 135-137
Washington DC, 20007, USA 50933 Cologne, Germany
Fon/Fax: +1 202 342-0180/1 Fon/Fax: +49 221 949-9170/1http://www.gams.com http://www.gams.de
\
Lutz Westermann LWestermann@gams.com
GAMS Development Corporation GAMS Software GmbH
1217 Potomac St. NW, Eupener Str. 135-137
Washington DC, 20007, USA 50933 Cologne, Germany
Fon/Fax: +1 202 342-0180/1 Fon/Fax: +49 221 949-9170/1
http://www.gams.com http://www.gams.de
–
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.
\