|
From: | Lloyd Dupont |
Subject: | bug with objc runtime (on Windows) |
Date: | Thu, 19 May 2005 10:47:29 +1000 |
I have a very simple ObjectiveC only program which
reproduce my problem, a memory access violation after a simple
lookup.
Any idea what it could be?
the file are attached but I copy for you the code
inline.
It has this memory access violation problem while
trying to display the name of the super class....
-------------------------------------------------------------------------------
#include <objc/objc-api.h>
#include <Foundation/Foundation.h> #include <stdio.h> #include <stdlib.h> #include <windows.h> #define DEBUG2(x, fmt) printf("(%s:%d):%s :%s = %"
#fmt "\n", __FILE__, __LINE__, __FUNCTION__, #x, x)
main()
{ LoadLibrary("Kernel32"); LoadLibrary("gnustep-base"); Class c1 = objc_get_class("NSAutoreleasePool"); DEBUG2(c1, p); const char * n1 = class_get_class_name(c1); DEBUG2(n1, s); Class c2 = class_get_super_class(c1); DEBUG2(c2, p); const char * n2 = class_get_class_name(c2); DEBUG2(n2, s); return 0; } |
testobjc.m
Description: Binary data
GNUmakefile
Description: Binary data
[Prev in Thread] | Current Thread | [Next in Thread] |