| www.delorie.com/archives/browse.cgi | search |
| From: | "Rafal 'Raf256' Maj" <rafal AT raf256 DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | inline |
| Date: | 29 Aug 2002 07:40:29 GMT |
| Organization: | news.onet.pl |
| Lines: | 29 |
| Sender: | raf256 AT poczta DOT onet DOT pl@rafal.joint.eu.org |
| Message-ID: | <Xns927961B9FE2B4raf256com@213.180.128.20> |
| NNTP-Posting-Host: | rafal.joint.eu.org |
| Mime-Version: | 1.0 |
| X-Trace: | news.onet.pl 1030606829 18850 62.233.182.179 (29 Aug 2002 07:40:29 GMT) |
| X-Complaints-To: | abuse AT onet DOT pl |
| NNTP-Posting-Date: | 29 Aug 2002 07:40:29 GMT |
| User-Agent: | Xnews/5.03.24 |
| X-Complains-To: | admin AT raf256 DOT com |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
Hi,
I have project with several files. When class is in .h (declaration) and in
.cpp (definition) - then I can not use inline methods.
i.e:
--- test.h ---
class cTest {
public :
inline void fun();
};
--- test.cpp ---
inline void cTest::fun() { /* ... */ }
If I try to use cTest::fun() somwhere then linker reports like :
Error: main.o: In function `main':
main.cpp(61) Error: undefined reference to `cMonoBmp::PutPx(int, int,
bool)'
Error: collect2: ld returned 1 exit status
There were some errors
after removing 'inline' everything is o.k.
--
Rafał 'Raf256' Maj
http://www.raf256.com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |