Skip navigation
cjpfromcq
Currently Being Moderated

err :Undefined sym: __ZN3FooC1Ev   at Function/<anonymous>()

Feb 20, 2012 8:14 AM

Foo.h

#pragma once

class Foo

{

public:

  Foo(int n);

  virtual ~Foo(void);

  int Plus(int m);

  int num2;

};

 

 

Foo.cpp

#include "Foo.h"

Foo::Foo(int n)

{

  num2=n;

}

Foo::~Foo(void)

{

}

int Foo::Plus(int m)

{

  int n=100+m+num2;

  return n;

  

}

 

 

 

 

         

main.cpp

#include <stdlib.h>

#include <stdio.h>

#include "Foo.h"

#include "AS3.h"

 

 

static AS3_Val fc(void* self, AS3_Val args)

{

        

  Foo f(10);

  int m=f.Plus(1);

 

  return AS3_Int(m);

  

}

 

int main()

{

      

        AS3_Val fcMethod = AS3_Function( NULL, fc );

        AS3_Val result = AS3_Object( "fc:AS3ValType",  fcMethod  );

        AS3_Release(  fcMethod  );    

        AS3_LibInit( result );

 

        return 0;

}

 

there is the source.why always err:

Undefined sym: __ZN3FooC1Ev

  at Function/<anonymous>()

  at Function/<anonymous>()

 

 

who can help me ???


 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points