problem compiling 3rd party code

This is a discussion on problem compiling 3rd party code within the C Programming forums, part of the General Programming Boards category; i am having some problems compiling this code. There is a makefile, but using it to compile gives me errors. ...

  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    28

    problem compiling 3rd party code

    i am having some problems compiling this code. There is a makefile, but using it to compile gives me errors. Also tried compile the .C files one at a time but errors out too. Even with CGAL installed.

    Can someone take a look at it please?
    Thanks
    Last edited by autopilot; 09-12-2007 at 04:40 AM.

  2. #2
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    What kind of errors are you getting?

    QuantumPete
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Perhaps you can post the first few error messaages - it is most likely because you are missing some header files (or you've not told the compiler where those header files are).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    Registered User
    Join Date
    Aug 2007
    Posts
    28
    Somethink like:

    Code:
    makefile:65: warning: overriding commands for target `.C'
    /home/roliveira/NormFet_src/makefile:65: warning: ignoring old commands for target `.C'
    O2  main.C
    make: O2: Command not found
    make: [main] Error 127 (ignored)
    O2  util.C
    If i compile the .C files by themselves
    Code:
    $ gcc -g -Wall main.C 
    In file included from main.C:1:
    datastructure.h:5:24: error: CGAL/basic.h: No such file or directory
    datastructure.h:6:28: error: CGAL/Cartesian.h: No such file or directory
    datastructure.h:7:27: error: CGAL/MP_Float.h: No such file or directory
    datastructure.h:8:33: error: CGAL/Filtered_exact.h: No such file or directory
    datastructure.h:9:27: error: CGAL/Quotient.h: No such file or directory
    datastructure.h:10:32: error: CGAL/Lazy_exact_nt.h: No such file or directory
    ...
    util.h:36: error: 'reg_Triangulation' was not declared in this scope
    util.h:36: error: 'reg_T' was not declared in this scope
    est.h:3: error: variable or field 'eval_features' declared void
    est.h:3: error: 'Triangulation' was not declared in this scope
    est.h:3: error: 'triang' was not declared in this scope

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    The first one is because CC isn't set to the name of your compiler (and no default is supplied), so when it does:
    Code:
        $CC $CFLAGS somefile.c
    it becomes a line with CFLAGS only, which starts with -O2. The minus is eaten by MAKE (it means "ignore errors on this command", IIRC).

    Setting CC=gcc or CC=cl should solve this one.

    The second lot is obviously not finding the header files for GCAL - maybe you need to put a path in for that. Use "-I somepath" to do that.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problems with compiling code in cygwin
    By firyace in forum C++ Programming
    Replies: 4
    Last Post: 06-01-2007, 08:16 AM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  3. problem with selection code
    By DavidP in forum Game Programming
    Replies: 1
    Last Post: 06-14-2004, 01:05 PM
  4. Problem : Threads WILL NOT DIE!!
    By hanhao in forum C++ Programming
    Replies: 2
    Last Post: 04-16-2004, 01:37 PM
  5. Big Code, Little Problem
    By CodeMonkey in forum Windows Programming
    Replies: 4
    Last Post: 10-03-2001, 05:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21