看板Programming
标 题Re: [问题] C++ 程式 link 问题
发信站政大狂狷年少 (Wed Mar 19 05:39:48 2008)
转信站ptt!ctu-reader!ctu-peer!news.nctu!csnews.cs.nctu!news.cs.nctu!news.cs.
※ 引述《[email protected] (残梦)》之铭言:
> 请问 C++ 的 class 如果配合 template 使用
> 可以先编译组译成 obj 档
> 日後再行 link 吗?
> 现在有 a.h a.cpp 以及 main.cpp
基本上...
你真要这样用的话程式码也没写对,
这需要使用到 export 这个保留字,
相关资讯请查 C++ 的教科书。
不过很遗憾的是目前的 C++ compiler 对 export 几乎不支援,
包括你正在使用的 GCC 在内,
Comeau C++ Compiler 有支援它,
而且非常便宜只要 US$ 50,
抓它的刷卡单来写一写 FAX 过去就 ok 了;
不过在那之前你最好跟他们业务确认一下你的使用环境,
因为执行环境的限制多到有点让人火大。
--
Ling-hua Tseng (
[email protected])
Department of Computer Science, National Tsing-Hua University
Interesting: C++, Compiler, PL/PD, OS, VM, Large-scale software design
Researching: Software pipelining for VLIW architectures
Homepage:
https://it.muds.net/~uranus
--
╔═══╗ ┼────────────────────────╮
║狂狷 ║ │
* Origin:[ 狂 狷 年 少 ] whshs.cs.nccu.edu.tw ╰─╮
║ 年少║ ┼╮
< IP:140.119.164.252 > ╰─╮
╚╦═╦╝ ╰
* From:61-230-226-82.dynamic.hinet.net
─╨─╨─ KGBBS ─ ◎ 遨翔"BBS"的狂狷不驯;属於年少的轻狂色彩 ◎
1F:推 horngsh:推Comeau C++ 59.126.240.23 03/19 10:45
2F:推 godfat:mac os 10.4 的拿到 10.5 跑不起来 orz 220.135.28.18 03/19 12:04