看板 C_and_CPP 關於我們 聯絡資訊
開發平台(Platform): (Ex: VC++, GCC, Linux, ...) visual studio 2015 額外使用到的函數庫(Library Used): (Ex: OpenGL, ...) system-2.3.1 問題(Question): 我按照以下的教學設定systemc環境 https://www.youtube.com/watch?v=0N7571XnkRQ
設定完後執行 http://www.asic-world.com/systemc/first1.html#Introduction hello world程式 但他一直跑出 namespace "std" 沒有成員 "gets"(systemc.h) 錯誤 C4996 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.(sc_nbutils.h) 程式碼: std::sprintf( msg, "is_valid_base( sc_numrep base ) : " "base = %s is not valid", to_string( base ).c_str() ); 等錯誤,還有一些警告,但這都是systemc內的程式...請問哪裡設定有錯? 順道一提 在編譯systemc時一直跑出 Unknown compiler version - please run the configure tests and report the results 但最後都編譯成功,請問這有什麼差嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.38.118.193 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1444748438.A.AF4.html ※ 編輯: future314 (114.38.118.193), 10/13/2015 23:19:26
johnjohnlin: 文章裡面有用的資訊量有點少... 10/13 23:34
future314: 我是把錯誤碼直接複製下來的...請問還缺少什麼? 10/13 23:46
※ 編輯: future314 (114.38.118.193), 10/14/2015 00:09:22
petercoin: gets已經不被VS2015支援了吧 10/14 00:24
petercoin: sprintf就直接加一行#define _CRT_SECURE_NO_WARNINGS 10/14 00:25
cory8249: gets 我是直接把那行註解掉 不影響功能 10/14 00:56
cory8249: 目前用 VS 2015 可以順順跑沒問題 10/14 00:56
future314: 原來是直接註解掉阿...想說會不會影響功能 10/14 01:00
future314: 但是第2個錯誤加了P大的方法還是一直跑出來.... 10/14 01:01
fatrabitree: 加一行那個要加在最上面 10/14 07:21
future314: 感謝各位板友回應 終於成功了 10/14 19:55
future314: 另外也參考 http://goo.gl/1TLXcE 10/14 19:58