×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    20

    undefined symbol

    Hi there;

    I am trying to export a class' constructer. However , it gives an error that it says undefined symbol.

    Undefined symbol: 'int Math::ASin(double &, double const &) (?ASin@Math@@SAHAANABN@Z)'

    Errors similar to this. I cant freeze its exports. I cant see my exported functions in .def file .

    plz help me asap.

    tnx

  2. #2
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: undefined symbol

    not very sure why this is coming. If there are some def file present in your dir structure delete them and cleanbuild your application
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    20

    Re: undefined symbol

    it was giving 27 errors. i was missing some libs. i added them problem solved.

    however just 1 errror left. it is giving error in enum. and it says undefined symbols. i am sending my error log again.

    Undefined symbol: 'enum EAnimationState state::iMyStt (?iMyStt@state@@0W4EAnimationState@@A)'

    btw deleting def file and recreating doesnt solve the problem.

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: undefined symbol

    Coudl you check the scope of enum ? You might need ::

  5. #5
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,671

    Re: undefined symbol

    Quote Originally Posted by koraykayir View Post
    Undefined symbol: 'enum EAnimationState state::iMyStt (?iMyStt@state@@0W4EAnimationState@@A)'
    This particular one seems to be a static variable.
    Static variables have to be defined the same way as global variables
    Code:
    EAnimationState state::iMyStt;
    has to appear exactly one of your .cpp files. However it remains to be a very bad (ab)use of naming conventions.

    Math is part of euser.lib, which library is required for any Symbian C++ code.

  6. #6
    Registered User
    Join Date
    Oct 2010
    Posts
    20

    Re: undefined symbol

    yea that part is static. so how should i define it? i wanna use it in my other classes that is why i made it static.

    ur quote doesnt work also i am sending that part of my code.
    Code:
    #ifndef STATE_H_
    #define STATE_H_
    #include <coemain.h>
    
    enum EAnimationState
    	{
    		EASExecuting = 0 , 
    		EASStopped = 1 
    	};
    
    class state 
    	{
    	
    		public:
    			IMPORT_C state();
    			IMPORT_C state(TInt ST);
    		
    		private:
    			~state();
    			
    		public:
    			IMPORT_C static TInt GetState();
    			IMPORT_C static void SetState(TInt aStt);
    			
    		private:
    			static EAnimationState::iMyStt;
    			
    	};
    #endif

  7. #7
    Regular Contributor
    Join Date
    Jul 2009
    Posts
    125

    Re: undefined symbol

    declare it as

    static EAnimationState iMystt;

    in your .h file. The define it your .cpp file like a global variable means state::iMystr = something;
    Regards,
    manjusg

  8. #8
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,671

    Re: undefined symbol

    Say, this file is called state.h
    Have you put the line in my post into state.cpp?

  9. #9
    Registered User
    Join Date
    Oct 2010
    Posts
    20

    Re: undefined symbol

    yea it worked finally.
    tnx fellas.

Similar Threads

  1. Undefined symbol
    By amitgawali in forum Symbian
    Replies: 7
    Last Post: 2010-05-08, 18:39
  2. Replies: 18
    Last Post: 2009-10-22, 16:12
  3. Undefined symbol
    By sanjayks84 in forum Symbian
    Replies: 10
    Last Post: 2008-05-17, 11:47
  4. Undefined symbol!??
    By tinka_83 in forum Symbian
    Replies: 2
    Last Post: 2008-05-10, 17:14
  5. Undefined symbol:
    By nimco in forum Symbian
    Replies: 2
    Last Post: 2007-09-29, 19:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×