Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] compile stand-alone program

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] compile stand-alone program


Chronological Thread 
  • From: Qianqian Fang <>
  • To:
  • Subject: Re: [cgal-discuss] compile stand-alone program
  • Date: Fri, 28 Mar 2008 12:51:43 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=NLQjioHAqUVEORQx85DuuA9vUhdpH8kefCZ/Pe7f/Mv0vPVfudGjk29A6mEj9WTyHCI0yKjyun8tfLUy5QG4lU4wpkExsTRAGHmi9MZhVKK8DWUw1dPgTWjLqUVnIjBgc+wgui436JnpkBkR0ttveQjE4gnmuLVMIlabi8pO7Lo=

Joachim Reichel wrote:
There is no option, but you can do it manually. Have a look at the link
command. First of all, try to reduce to set of passed libraries. In this
case, all of them except -lCGAL can be dropped. Now replace -lCGAL by

-Wl,-Bstatic -lCGAL -Wl,-Bdynamic

to tell the linker to use the static library of CGAL. There will be some
dependencies on dynamic libraries left, but most probably they will be
present on the target system. You could also use

-Wl,-Bstatic -lCGAL -lstdc++ -Wl,-Bdynamic

to link the C++ library statically as well.

Joachim

hi Joachim

thank you very much for the information. Following your suggestion, I managed to compile
the code by the following options on Ubuntu 8.04

-static-libgcc -Wl,-Bstatic -lCGAL -Wl,-Bdynamic

without -static-libgcc, g++ complained that "ld cannot find lgcc_s".

thank you again for the help

Qianqian



Archive powered by MHonArc 2.6.16.

Top of Page