Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User koraykayir's Avatar
    Join Date
    Oct 2010
    Posts
    20
    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
    Nokia Developer Champion kkrish's Avatar
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,029
    not very sure why this is coming. If there are some def file present in your dir structure delete them and cleanbuild your application

  3. #3
    Registered User koraykayir's Avatar
    Join Date
    Oct 2010
    Posts
    20
    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 mahbub_s60's Avatar
    Join Date
    Mar 2008
    Posts
    1,481
    Coudl you check the scope of enum ? You might need ::

  5. #5
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    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 koraykayir's Avatar
    Join Date
    Oct 2010
    Posts
    20
    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 manjusg's Avatar
    Join Date
    Jul 2009
    Posts
    125
    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 wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    27,747
    Say, this file is called state.h
    Have you put the line in my post into state.cpp?

  9. #9
    Registered User koraykayir's Avatar
    Join Date
    Oct 2010
    Posts
    20
    yea it worked finally.
    tnx fellas.

Similar Threads

  1. Undefined symbol
    By amitgawali in forum Symbian C++
    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 C++
    Replies: 10
    Last Post: 2008-05-17, 11:47
  4. Undefined symbol!??
    By tinka_83 in forum Symbian C++
    Replies: 2
    Last Post: 2008-05-10, 17:14
  5. Undefined symbol:
    By nimco in forum Symbian C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved