Hello again Gioker A few more thoughts ..
------------------------------------------------------------ To: Robbie Morrison <[email protected]> Subject: Re: [Help-glpk] ELF Library Message-ID: <CAAvgtu8ESennG-1BPOd69HWqp_w9N0uE=_cq1cps0-ojgg5...@mail.gmail.com> From: Giorgio Sartor <[email protected]> Date: Wed, 10 Apr 2013 20:43:09 +0200 ------------------------------------------------------------ [snip] > However I successfully compiled the GLPK library > in the server. Using "--prefix=PATH" with > "configure" I was able to tell GLPK where to put > my libraries. > > But my problem is not solved. In fact gcc still > can't link. My 5 files are: main.c define.h > cplex.c cplex.h glpk.h > > I use the command: > gcc -L../glpk/lib -lglpk main.c cplex.c -o proximityglpk I take it you built GLPK as a dynamic link library. You may need to update the runtime linker cache (but confirm the exact command before you use it, particularly as you may not have superuser privileges): $ sudo ldconfig --verbose Are you using a suitably structured makefile -- or something equivalent: http://en.wikipedia.org/wiki/List_of_build_automation_software That certainly makes faultfinding easier. > that gives me the linking error: > /ext/256611.1.LOW/cc84zdWg.o: In function `getintparam': > cplex.c:(.text+0x6b): undefined reference to `glp_assert_' > cplex.c:(.text+0x92): undefined reference to `glp_assert_' > /ext/256611.1.LOW/cc84zdWg.o: In function `getdblparam': > cplex.c:(.text+0x11a): undefined reference to `glp_assert_' > cplex.c:(.text+0x141): undefined reference to `glp_assert_' > etc... > > Now I'm contacting the administrator of the system. Good luck! HTH, Robbie > Gioker > > 2013/4/10 Robbie Morrison <[email protected]> > >> >> Hello Gioker >> >> I am a little puzzled by your problem >> description. But the following thoughts >> may possibly help. >> >> ------------------------------------------------------------ >> To: "[email protected]" <[email protected]> >> Subject: [Help-glpk] ELF Library >> From: Giorgio Sartor <[email protected]> >> Date: Wed, 10 Apr 2013 15:57:17 +0200 >> ------------------------------------------------------------ >> >> > If I had been able to install glpk I would have >> > done it and I would have create my own ELF >> > library. Unfortunately the Linux system is a >> > computing server in which I can't install >> > anything. The kind of .o file that the server >> > produces after compilation is : >> > >> > ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped >> >> That is the standard Linux format, if I am not >> mistaken. My Linux box reports, for a binary with >> GLPK statically linked: >> >> ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), >> statically linked, for GNU/Linux 2.6.15, not stripped >> >> And it reports '/usr/local/lib/libglpk.a' as: >> >> current ar archive >> >> > So I would like to have a glpk library made of >> > this kind of Objects instead of the Mach-O ones. >> >> > Any solution? >> >> GNU gcc can apparently cross-compile to >> Mach-o. See the manpage for 'gcc'. >> >> Can you not work on your server in user space? >> >> Else, talk to your sysadmin and get some >> appropriate privileges to work on the server >> as root. Or have them do the work. >> >> Just two other points. Some more details about >> your systems and toolchains would help. And was >> there a good reason to rename this thread, because >> the earlier history is now orphaned? >> >> HTH, Robbie --- Robbie Morrison PhD student -- policy-oriented energy system simulation Technical University of Berlin (TU-Berlin), Germany University email (redirected) : [email protected] Webmail (preferred) : [email protected] [from Webmail client] _______________________________________________ Help-glpk mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-glpk
