Skip to Content.
Sympa Menu

cgal-discuss - Re: Re: [cgal-discuss] linking problem

Subject: CGAL users discussion list

List archive

Re: Re: [cgal-discuss] linking problem


Chronological Thread 
  • From: "nimrod rubinstein" <>
  • To:
  • Subject: Re: Re: [cgal-discuss] linking problem
  • Date: Mon, 21 Jan 2008 01:08:20 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=ghQNeHjPGYLNZrZ0MOVRAlO+GYFH6DDaXCL43BqaygBcaL2QFRSy4HGGr/6MsjoRIraSEsh5pOQ4y/Od+O6ttrvdiGx2CuSlVE5AZFXx8WWjwlb8p8cp7tgQBerugp9KBlph6U/voVl/5J9+Adj20ejouA/rW3UMO+NdUeH32Gc=

ok,
so if, for example, i have a source files  Scan.cpp, and svm_classify.c
should this be the addition?:
Scan$(OBJ_EXT)\
svm_classify$(OBJ_EXT)\


Hi,

> I've installed CGAL 3.3.1. on my linux account.
> I'm using some of CGAL components so in order to compile my code I built a
> makefile using the cgal_create_makefile script.
> The compiling seems to pass OK, however linking fails (as far as my very
> humble knowledge on make extends). One striking observation is that no .o
> files are created during compilation except for the file that contains main
> (Epitopia.cpp - below).

the makefile created by cgal_create_makefile assumes that there is only one
source file per executable. It should work if you add all your object files at
the end of this line:

> Epitopia$(EXE_EXT): Epitopia$(OBJ_EXT)

Regards,
  Joachim

Hi,

I've installed CGAL 3.3.1. on my linux account.
I'm using some of CGAL components so in order to compile my code I built a makefile using the cgal_create_makefile script.
The compiling seems to pass OK, however linking fails (as far as my very humble knowledge on make extends). One striking observation is that no .o files are created during compilation except for the file that contains main ( Epitopia.cpp - below).

here's the makefile that's created:

# Created by the script cgal_create_makefile
# This is the makefile for compiling a CGAL application.

#-----------------------------
----------------------------------------#
#                    include platform specific settings
#---------------------------------------------------------------------#
# Choose the right include file from the <cgalroot>/make directory.

# CGAL_MAKEFILE = ENTER_YOUR_INCLUDE_MAKEFILE_HERE
include $(CGAL_MAKEFILE)

#---------------------------------------------------------------------#
#                    compiler flags
#---------------------------------------------------------------------#

CXXFLAGS = \
           -I../../include \
           $(CGAL_CXXFLAGS) \
           $(LONG_NAME_PROBLEM_CXXFLAGS)

#---------------------------------------------------------------------#
#                    linker flags
#---------------------------------------------------------------------#

LIBPATH = \
          $(CGAL_LIBPATH)

LDFLAGS = \
          $(LONG_NAME_PROBLEM_LDFLAGS) \
          $(CGAL_LDFLAGS)

#---------------------------------------------------------------------#
#                    target entries
#---------------------------------------------------------------------#

all:            \
                Epitopia$(EXE_EXT)

Epitopia$(EXE_EXT): Epitopia$(OBJ_EXT)
    $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Epitopia Epitopia$(OBJ_EXT) $(LDFLAGS)

clean: \
all my .c and .cpp files
#---------------------------------------------------------------------#
#                    suffix rules
#---------------------------------------------------------------------#

.C$(OBJ_EXT):
    $(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<

cpp$(OBJ_EXT):
    $(CGAL_CXX) $(CXXFLAGS) $(OBJ_OPT) $<


and the linking errors are like this:
Epitopia.o(.text+0x158): In function `main':
: undefined reference to `Parameters::readParameters(std::basic_istream<char, std::char_traits<char> >&)'
Epitopia.o(.text+0x18a): In function `main':
: undefined reference to `Parameters::dump(std::basic_ostream<char, std::char_traits<char> >&)'

any idea what's wrong?




Archive powered by MHonArc 2.6.16.

Top of Page