[Symphony] Symphony on C++ with Eclipse

Hugh Medal hugh.medal at msstate.edu
Sat Dec 1 11:03:05 EST 2012


Thank you Ted.

*Here is my info:*
OS: Linux (Ubuntu 12.04)
Compiler: g++ (version 4.6.3)
SYMPHONY version: 5.4.4
Eclipse version: 4.2.0; using CDT plugin

*Steps I have taken:*
1. Installed SYMPHONY 5.4.4 into my /opt directory (using ./configure,
make, make install; I ran make test and it was successful)
2. Added the symphony include directories to Eclipse
- Project > Properties > C/C++ Compiler > Settings > GCC C++ Compiler
> Includes
- added /opt/SYMPHONY-5.4.4/include
and /opt/SYMPHONY-5.4.4/SYMPHONY/include to the "include paths" list
3. Added the symphony lib directory to Eclipse
- Project > Properties > C/C++ Compiler > Settings > GCC C++ Linker
> Libraries
- added /opt/SYMPHONY-5.4.4/lib to the "Library search path" list
3. Added the symphony Libraries Eclipse
- Project > Properties > C/C++ Compiler > Settings > GCC C++ Linker
> Libraries
- added "Sym" to the "Libraries" list (I am not sure if I need to add an
more libraries)
4. Created a C++ project
5. Created the following .cpp file

#include "coin/OsiSymSolverInterface.hpp"

int main(int argc, char **argv)
{
OsiSymSolverInterface osi;
}

*Problems:*
When I build my project, I am getting this message (see errors in bold):

make all
Building file: ../src/MySource.cpp
Invoking: GCC C++ Compiler
g++ -I/opt/ibm/ILOG/CPLEX_Studio124/cplex/include
-I/opt/ibm/ILOG/CPLEX_Studio124/concert/include
-I/opt/SYMPHONY-5.4.4/include -I/opt/SYMPHONY-5.4.4/SYMPHONY/include -O0
-g3 -Wall -c -fmessage-length=0 -m32 -O -fPIC -fno-strict-aliasing
-fexceptions -DNDEBUG -DIL_STD -MMD -MP -MF"src/MySource.d"
-MT"src/MySource.d" -o "src/MySource.o" -c "../src/MySource.cpp"
Finished building: ../src/MySource.cpp

Building target: HughCPP
Invoking: GCC C++ Linker
g++ -L/opt/ibm/ILOG/CPLEX_Studio124/cplex/lib/x86_sles10_4.1/static_pic
-L/opt/ibm/ILOG/CPLEX_Studio124/concert/lib/x86_sles10_4.1/static_pic
-L/opt/SYMPHONY-5.4.4/lib -o "HughCPP"  ./src/Lottery.o ./src/MegaLottery.o
./src/MySource.o   -lilocplex -lcplex -lconcert -lm -lpthread -lSym
./src/MySource.o: In function `main':
*/home/hmedal/Documents/2_msu/research_manager/code/ide/eclipse/HughCPP/Debug/../src/MySource.cpp:125:
undefined reference to `OsiSymSolverInterface::OsiSymSolverInterface()'*
*/home/hmedal/Documents/2_msu/research_manager/code/ide/eclipse/HughCPP/Debug/../src/MySource.cpp:125:
undefined reference to `OsiSymSolverInterface::~OsiSymSolverInterface()'*
*collect2: ld returned 1 exit status*
*make: *** [HughCPP] Error 1*


On Fri, Nov 30, 2012 at 9:38 AM, Ted Ralphs <ted at lehigh.edu> wrote:

> I use Eclipse and can probably help, but you'll have to give some more
> information, such as
>
> 1. OS
> 2. Compiler
> 3. SYMPHONY version
> 4. What problems you've encountered
>
> Cheers,
>
> Ted
>
> On Thu, Nov 29, 2012 at 8:40 PM, Hugh Medal <hugh.medal at msstate.edu>wrote:
>
>> Hello,
>>
>> Has anyone had success getting SYMPHONY to work with Eclipse CDT? I tried
>> some instructions for SMI (
>> https://projects.coin-or.org/BuildTools/wiki/pm-howdoi) but couldn't get
>> them to work.
>>
>> Thanks,
>> Hugh
>>
>> --
>> Hugh Medal
>> Assistant Professor
>> Industrial and Systems Engineering
>> Mississippi State University
>> Office: 260K McCain
>> Office: 662-325-3923
>> Cell Phone: 701-866-1179
>> Email: hmedal at i <hmedal at uark.edu>se.msstate.edu
>> Website: hm568.ise.msstate.edu
>> Twitter: hughmedal <https://twitter.com/#!/hughmedal>
>> Facebook: Hugh Medal <http://www.facebook.com/hugh.medal>
>> LinkedIn: Hugh Medal<http://www.linkedin.com/profile/view?id=65478854&authType=name&authToken=lX4B&pvs=pp>
>> Google+: Hugh Medal <https://plus.google.com/111704068836614551361/posts>
>>
>>
>> _______________________________________________
>> Symphony mailing list
>> Symphony at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/symphony
>>
>>
>
>
> --
> Dr. Ted Ralphs
> Associate Professor, Lehigh University
> (610) 628-1280
> ted 'at' lehigh 'dot' edu
> coral.ie.lehigh.edu/~ted
>
>


-- 
Hugh Medal
Assistant Professor
Industrial and Systems Engineering
Mississippi State University
Office: 260K McCain
Office: 662-325-3923
Cell Phone: 701-866-1179
Email: hmedal at i <hmedal at uark.edu>se.msstate.edu
Website: hm568.ise.msstate.edu
Twitter: hughmedal <https://twitter.com/#!/hughmedal>
Facebook: Hugh Medal <http://www.facebook.com/hugh.medal>
LinkedIn: Hugh Medal<http://www.linkedin.com/profile/view?id=65478854&authType=name&authToken=lX4B&pvs=pp>
Google+: Hugh Medal <https://plus.google.com/111704068836614551361/posts>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/symphony/attachments/20121201/d7fb786d/attachment.html>


More information about the Symphony mailing list