Thread: compiling with g++

  1. #16
    Registered User
    Join Date
    Jun 2008
    Posts
    106
    Quote Originally Posted by CornedBee View Post
    What compiler did your coworker use? It may well be that <cassert> was indirectly included for him, and you're reaping the rewards for his impreciseness in header use.
    solaris compiler, your comments always impress me -- seriously!

  2. #17
    Registered User
    Join Date
    Jun 2008
    Posts
    106
    Quote Originally Posted by CornedBee View Post
    What compiler did your coworker use? It may well be that <cassert> was indirectly included for him, and you're reaping the rewards for his impreciseness in header use.
    adding #include <cassert> to input.h still gives me assert errors

    Code:
    input.h: In member function 'float dataset_buf::operator()(int, int, int) const':
    input.h:73: error: 'assert' was not declared in this scope
    input.h: In member function 'float& dataset_buf::operator()(int, int, int)':
    input.h:77: error: 'assert' was not declared in this scope
    input.h: At global scope:
    input.h:97: error: expected ',' or '...' before '<' token
    input.h:97: error: ISO C++ forbids declaration of 'valarray' with no type
    input.h:107: error: ISO C++ forbids declaration of 'valarray' with no type
    input.h:107: error: expected ';' before '<' token
    input.h: In constructor 'quantizer::quantizer(int)':
    input.h:97: error: class 'quantizer' does not have any field named 'v'
    input.h:97: error: 'v' was not declared in this scope
    input.h: In member function 'int quantizer::nq() const':
    input.h:102: error: 'v' was not declared in this scope
    input.h: In member function 'int quantizer::operator()(float) const':
    input.h:116: error: 'v' was not declared in this scope
    input.h: In member function 'void dataset_loader::derive_radon_blob_summary(const std::string&)':
    input.h:299: error: 'assert' was not declared in this scope
    input.h: At global scope:
    input.h:519: error: expected ',' or '...' before '<' token
    input.h:519: error: ISO C++ forbids declaration of 'valarray' with no type
    input.h:545: error: ISO C++ forbids declaration of 'valarray' with no type
    ...
    Last edited by elninio; 06-30-2008 at 03:12 PM.

  3. #18
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Can you post the context code, i.e. line 73 and some around it?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #19
    Registered User
    Join Date
    Jun 2008
    Posts
    106
    > sorry to have wasted your time. i assumed the code i received was functional. it wasn't. lol... a dangerous assumption to make!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie Compiling Problem
    By Deronius in forum C++ Programming
    Replies: 3
    Last Post: 06-15-2008, 11:23 AM
  2. Problem compiling files that store functions
    By tiachopvutru in forum C++ Programming
    Replies: 10
    Last Post: 05-30-2008, 05:42 PM
  3. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  4. Compiling in Unix vs Visual C++
    By stimpyzu in forum C++ Programming
    Replies: 2
    Last Post: 09-30-2002, 06:41 AM
  5. Compiling syntax
    By Jez_Master in forum C++ Programming
    Replies: 3
    Last Post: 04-01-2002, 09:46 PM