[問題] template function包成dll

看板C_and_CPP作者 (實況「野球」魂)時間16年前 (2009/10/20 17:21), 編輯推噓1(104)
留言5則, 4人參與, 最新討論串1/2 (看更多)
我用VC6寫了一個dll,裡頭有一個class, 包含一個template function, compile OK。 可是檔案產生後,我用depend看dll, 那個template function並沒有在其中, 所以無法透過此dll使用這個function, 請問這大概會是什麼問題呀? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.135.250.104

10/20 17:29, , 1F
沒有export吧? 可以查msdn 我記得有dll walkthrough
10/20 17:29, 1F

10/21 00:38, , 2F
template function 好像是要用到才具現化
10/21 00:38, 2F

10/21 01:17, , 3F
建議再仔細看看什麼是template吧...
10/21 01:17, 3F

10/21 12:38, , 4F
所以它應該叫 function template,只是一個模版而已。
10/21 12:38, 4F

10/21 12:38, , 5F
倒過來寫反而會以為它是一個 function。
10/21 12:38, 5F
文章代碼(AID): #1AtO3zfj (C_and_CPP)
文章代碼(AID): #1AtO3zfj (C_and_CPP)