Forum Replies Created
-
AuthorPosts
-
I just tried building ted2 on my iMac and encountered fibre-related errors too:
Undefined symbols for architecture x86_64:
“_jump_fcontext”, referenced from:
bbFiber::fiberEntry(transfer_t) in std.a(_1_1_1fiber_2native_2fiber.cpp.o)
bbFiber::resumeFiber(int) in std.a(_1_1_1fiber_2native_2fiber.cpp.o)
bbFiber::suspendCurrentFiber() in std.a(_1_1_1fiber_2native_2fiber.cpp.o)
“_make_fcontext”, referenced from:
bbFiber::createFiber(bbFunction<void ()>) in std.a(_1_1_1fiber_2native_2fiber.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)If you’re making use of inheritance there are issues relating to constructor “chaining” – might be related to your errors?
There’s a forum topic about it:
http://monkey2.monkey-x.com/forums/topic/referencing-new/You might need to rework your underlying architecture a little bit to make it play nice with MX2…
Yes, this is fixed in V1.0.0. Thanks.
What’s your code for creating a new Store instance?
Congrats on the V1.0.0 milestone!
Explicit casting in MX2 is different than MX1. This line:
last = T(last._pred)
Should be:
last = Cast<T>(last._pred)
The following should compile without errors (I haven’t checked for any logic errors though):
[/crayon]Monkey12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758[crayon-5cb9d7cb5ffe3452226113 inline="true" ]#import "<std>"Function Main:Void()local store := New Store<Item>(20)EndClass ItemField _pred:ItemField _succ:ItemEndClass Store<T>Field last:TField total:IntMethod New(count:Int)Fill(count)End MethodMethod Fill:Void(total:Int)For Local i:Int = 0 Until totalLocal c:T = New T()c._pred = lastlast = cNextSelf.total = totalEndMethod Count:Int()Return totalEndMethod GetItem:T()If lastLocal c:T = lastlast = Cast<T>(last._pred)c._pred = Nulltotal -= 1Return cEndifReturn New T()EndMethod ReturnItem:Void(obj:T)obj._succ = Nullobj._pred = lastlast = objtotal += 1EndEnd16 canvases should be enough for anyone!
Haha, not if, for performance reasons, you want to pre-generate variably-sized images of blocks of text/labels/buttons/lists/etc.
EDIT: I should clarify, I’m only using 1 canvas at a time, local to a function/ method while rendering to an image.
Actually, I think this is fixed in my version…it works at 10000 anyway.
New stuff coming soon!
Great. Can’t wait to test it out… Might even be time soon for another donation.
That snippet should print out the numbers 5 to 1.
I’m actually shocked this bug has remained hidden this far into development (or maybe it got introduced recently?). Reverse cycling through a loop is a fundamental programming task – or at least it used to be.
I only found it because I’ve ported some old BlitzMax code that showed bizarre results in MX2 for no obvious reason. Stumped me for *hours*… Kinda relieved the problem isn’t in my code after all.
Edit:
@amon
Where did you have the code? Reverse For loop iteration fails for me in class Methods too.Here’s a link to Gustafson’s book on the subject:
Not read it yet myself, as I suspect it’s beyond my comprehension level.
Another thing that needs “redoing”, in my opinion, is character set representation, but that’s another topic…
EDIT: I’ve read the first few chapters of that book now and I’m actually finding it easily “digestible” and interesting…
Well, here we go… A test post.
EDIT: And a test edit.
-
AuthorPosts