ruby website (1.9.2-p180)의 안정된 루비 소스 코드를 다운로드하여 MinGW 4.5.2-TDM과 MSYS가 설치된 Windows에서 컴파일했습니다. 컴파일하려면 sh configure
과 make
을 실행했습니다. 나는 msvcrt-ruby191.dll 및 libmsvcrt-ruby191.dll.a을 예상대로 사용합니다. 루비의 DLL에 연결, g++
로 컴파일이 코드는 루비 1.9에서 작동하지 않지만 루비 1.8에서 작동하는 이유는 무엇입니까?
#include <ruby.h>
int main() {
ruby_init();
rb_funcall2(Qnil, rb_intern("p"), 1, (VALUE[]){INT2FIX(0)});
ruby_finalize();
}
I : 그럼이 코드를 썼다.
<main>: [BUG] Segmentation fault
ruby 1.9.2p180 (2011-02-18 revision 30909) [i386-mingw32]
-- control frame ----------
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 CFUNC :p
c:0001 p:0000 s:0002 b:0002 l:00120c d:00120c TOP
---------------------------
-- Ruby level backtrace information ----------------------------------------
ruby:0:in `p'
[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
문제는 다음과 같습니다 : 루비 1.8.7와 연결하면 동일한 코드가 완벽하게 작동 내가 실행 파일을 실행하면,이 오류 메시지를 받았습니다. 여기서 뭐가 잘못 됐니?
gdb 백 트레이스 란 무엇입니까 – rogerdpack