看板 C_and_CPP 關於我們 聯絡資訊
※ 引述《tihctw (Howard)》之銘言: : Hi, : 我用C寫了一個測試用的function, 叫test().然後在Cygwin下用GCC將它編譯成 static library 如下. : gcc -c foo.c -o foo.o : ar rcs libfoo.a foo.o : 然後我希望能在 Microsoft Visual Studio 2005 C++ 裡面使用這個 test() function. : 但是compile/link後,都會找不到test(). 我有extern test() 以及加入libfoo.a 到 linker 裡. : 請問一下我要如何才能在Cygwin下使用GCC 編譯出一個可以在Visual Studio 裡使用的 library? : 謝謝!!! : tihctw For shared library you can reference to this link. http://www.cygwin.com/ml/cygwin/2004-06/msg00274.html Why does the solution look a little complicated? This question is related to GCC toolchain and Cygwin environment on Win32 platform. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.116.236.53 ※ 編輯: ChampYen 來自: 122.116.236.53 (02/18 12:24)