給出以下命名空間,我在哪裏把我的declspec(用於dll導出)我想要所有的方法在所述的命名空間導出到DLL?我應該在哪裏放置DECLSPEC作爲命名空間?
namespace AguiText {
void drawTextArea(AguiGraphicsManager *g, const AguiFont &font,const AguiRectangle &area,
const AguiColor &color, const std::vector<std::string> &lines,
AguiHorizontalAlignmentEnum horizontalAlignment, AguiVerticalAlignmentEnum verticalAlignment);
void divideText(std::vector<std::string> &words,
const std::string &text,const AguiFont &font, int maxWidth = -1);
void makeTextLines(const AguiFont &font,const std::vector<std::string> &words,
std::vector<std::string> &lineWords, int maxWidth);
void pointInTextArea(const AguiFont &font,
const AguiRectangle &area, const AguiPoint &point,
const std::vector<std::string> &lines, AguiRectangle &retRect,
int &retIndex, AguiHorizontalAlignmentEnum horizontalAlignment, AguiVerticalAlignmentEnum verticalAlignment);
}
感謝
函數模板必須在頭文件中聲明(除非你打算只針對一組特定的參數對它進行實例化)。所以不需要出口。 – 2010-11-16 23:45:51
@Oil AguiText命名空間怎麼樣? – jmasterx 2010-11-17 00:06:20