From: Okan D. <okn...@gm...> - 2011-08-10 21:46:17
|
Thanks for the reply. Now i understand. I thought LoadLibrary function would do all the job for me. I went wrong. On 08/10/2011 11:50 PM, John Brown wrote: > > Okan Demir wrote: > ---------------------------------------- > >> When i define this class' functions in class' self block, i'm >> able to use these functions normally. But compiler gives a 'undefined >> reference to MyClass::MyFunc()...' error when i define function bodies >> out side of the class block in a different file which i include class' >> .h file into it. >> > >> ===foo.cpp=== >> int Foo::method() { >> ...func. body... >> } >> >> > Note that your example foo.cpp does not include foo.h, but I will just > assume that this is a mistake and the real foo.cpp (and also the program > that calls Foo::method()) includes foo.h, because the error message > would be different. > > The 'undefined reference to ...' error is a *linker* error. The linker > does not know where to find this function. You need to add libfoo to the > command line that builds the program that calls Foo::method(). > > Regards, > John Brown. > > > > ------------------------------------------------------------------------------ > uberSVN's rich system and user administration capabilities and model > configuration take the hassle out of deploying and managing Subversion and > the tools developers use with it. Learn more about uberSVN and get a free > download at: http://p.sf.net/sfu/wandisco-dev2dev > _______________________________________________ > MinGW-users mailing list > Min...@li... > > This list observes the Etiquette found at > http://www.mingw.org/Mailing_Lists. > We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated. > > _______________________________________________ > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > Also: mailto:min...@li...?subject=unsubscribe > |