linking error with inline functions

Discussion in 'C++' started by arjor, May 22, 2008.

  1. arjor

    arjor Guest

    hey guys

    When i try to make the following mutating method inline i get the
    following error:
    //method
    inline void vertex::setValue(int new_value) throw() { value_ =
    new_value; }

    error LNK2019: unresolved external symbol "public: void __thiscall
    vertex::setValue(int)" (?setValue@vertex@@QAEXH@Z) referenced in
    function _main

    removing the inline keyword fixes the problem
    any advice would be much appreciated
     
    arjor, May 22, 2008
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xiangliang Meng
    Replies:
    1
    Views:
    1,917
    Victor Bazarov
    Jun 21, 2004
  2. Replies:
    3
    Views:
    637
  3. Daniel Vallstrom
    Replies:
    2
    Views:
    2,859
    Kevin Bracey
    Nov 21, 2003
  4. jamihuq

    converting inline functions to C functions

    jamihuq, May 16, 2006, in forum: C Programming
    Replies:
    7
    Views:
    570
  5. Replies:
    6
    Views:
    512
    Ron Natalie
    Jul 18, 2006
  6. Sylvain Audi
    Replies:
    1
    Views:
    353
    Ian Collins
    Jan 13, 2007
  7. ciccio
    Replies:
    5
    Views:
    552
    red floyd
    Dec 21, 2007
  8. Rahul
    Replies:
    3
    Views:
    625
    James Kanze
    Feb 28, 2008
Loading...