Article View: borland.public.cppbuilder.migration
Article #129Dll problem in CBC2007.
From: Gene
Date: Sat, 05 Jul 2008 16:45
Date: Sat, 05 Jul 2008 16:45
22 lines
1400 bytes
1400 bytes
Hello,
I got a new problem for Dll calling from BCB2007. The Dll calling is ok in BCB6. That code is as in below:
In the Dll header:
#ifdef __BUILDING_DLL
#define __EXPORT_TYPE __export
#else
#define __EXPORT_TYPE __import
#endif
template <class T>
void __EXPORT_TYPE ClearContainer(T& x) { T y; y.swap(x); };
Then I include the header in my main cpp file, and call the function. The Dll project build is ok, but when I try to build the main project. It says "Link32 error: unresolved external function..." Does any one know what causes that and what should I do to get around?
Any suggestion will be appreciated.
Gene.
Technical Details
Message-ID:
<486fa525$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!tudelft.nl!txtfeed1.tudelft.nl!feeder.news-service.com!news.isoc.lu!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 110f51,ff6960108b83e27b,start X-Google-Attributes: gid110f51,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Gene" <shenjige@yahoo.ca> Sender: "Gene" <shenjige@yahoo.ca> Reply-To: "Gene" <shenjige@yahoo.ca> Subject: Dll problem in CBC2007. Newsgroups: borland.public.cppbuilder.migration X-User-Info: 116.25.140.96 NNTP-Posting-Host: 207.105.83.66 Message-ID: <486fa525$1@newsgroups.borland.com> Date: 5 Jul 2008 09:45:25 -0700 X-Trace: newsgroups.borland.com 1215276325 207.105.83.66 (5 Jul 2008 09:45:25 -0700) Lines: 22 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!tudelft.nl!txtfeed1.tudelft.nl!feeder.news-service.com!news.isoc.lu!newsgroups.borland.com!not-for-mail