[問題] C sharp呼叫C ok,呼叫C++就不正常?

看板C_and_CPP (C/C++)作者 (喔 好)時間16年前 (2009/05/11 22:04), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/1
有個 subroutine叫four1 (這該超有名,numberical recipes上面的) http://www.theo3.physik.uni-stuttgart.de/lehre/ss05/pac2/sets/fft.c 想用C sharp呼叫之 若complier選C++ 就會呼叫失敗(根本進不去four1) complier選C就完全正常 請問為何會這樣呢 thx (complier是 VC 2005) -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.112.80.118

05/11 22:08, , 1F
因為 C++ 有 name mangling 呀!
05/11 22:08, 1F

05/11 22:12, , 2F
extern "C" {} 一下吧
05/11 22:12, 2F
文章代碼(AID): #1A231iDq (C_and_CPP)
文章代碼(AID): #1A231iDq (C_and_CPP)