Thread: Compiling C++ under C code

  1. #1
    Registered User
    Join Date
    Nov 2004

    Question Compiling C++ under C code

    Hi I have a big problem I hope thatsome body help me.
    I need to join two codes, one is a driver of one board (mpRACE1), this driver was written on c++, it uses library vector, iostream, iomap, etc...
    The other code is on C, is the speech recognition SPHINX. the problem is the following one.

    When I include the library of the board and compiling whit gcc marks several errors, but all are derived of the next examples error

    /usr/include/uelib/log.h:47:20: iostream: No such file or directory
    /usr/include/uelib/log.h:48:19: sstream: No such file or directory
    /usr/include/uelib/log.h:49:19: iomanip: No such file or directory

    I change the way to compile, now I compile whit gcc but whit the suffix cxx, and the compile was successful, but now when I linked the program mark other errors like that
    main.o(.text+0x51): In function `main_initialize(int, char**, model_inventory_t**, lexicon_t**, model_def_t**, float*****, float****)':
    : undefined reference to `_E__pr_info(char*, ...)'

    Somebody have and idea thah I can do?
    How I can compile funtion of c++ (vector, iomap, fstream) on C code?

  2. #2

  3. #3
    Registered User
    Join Date
    Jun 2004
    Are you using a IDE?? They usually call the apropriate command line when compiling and linking all those stuff

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. loop and compiling inside a code
    By MtJ in forum C Programming
    Replies: 3
    Last Post: 03-05-2006, 12:50 PM
  2. Replies: 1
    Last Post: 03-01-2006, 03:07 AM
  3. compiling c code
    By MadCow257 in forum C++ Programming
    Replies: 2
    Last Post: 02-16-2006, 09:26 AM
  4. Seems like correct code, but results are not right...
    By OmniMirror in forum C Programming
    Replies: 4
    Last Post: 02-13-2003, 01:33 PM
  5. Replies: 4
    Last Post: 01-16-2002, 12:04 AM