Re: D array to c

2014-06-05 Thread Harpo via Digitalmars-d-learn
Thanks that was perfect. Also I am aware of the use of the 64bit numbers. Thank you for pointing it out though.

Re: D array to c

2014-06-05 Thread Harpo via Digitalmars-d-learn
sorry thats: struct examplestruct {int* array;} int numar[50]; examplestruct parameters; parameters.array = numuar; When I do that I get type conflictions. Error: cannot implicitly convert expression (numar) of type int[50] to int*... I am not sure what setup I need to have here. Anyone know w

D array to c

2014-06-05 Thread Harpo via Digitalmars-d-learn
= numuar; When I do that I get type conflictions. Error: cannot implicitly convert expression (numar) of type long[50] to long*... I am not sure what setup I need to have here. Anyone know whats up? Thanks! -Harpo

Re: Segfault in shared object when writeln

2014-06-03 Thread Harpo via Digitalmars-d-learn
Thanks! that was perfect. -Harpo

Segfault in shared object when writeln

2014-06-03 Thread Harpo via Digitalmars-d-learn
just printf is works. When I have writeln it segfaults. This fails import std.stdio; extern (C) void main(){ writeln("Does it work?"); } This works import core.stdc.stdio; extern (C) void main(){ printf("Works"); } === Any one know whats up? Thanks! -Harpo

DerelictOrg

2014-04-15 Thread Harpo
Hello. For the past week or so I have been trying to get some form of SDL with D. It seems that every tutorial I find is either deprecated or incompatible with my system. Currently I am trying to setup the SDL part of https://github.com/DerelictOrg. However I cannot get it to run. I have follow

running my program with shared libraries

2014-04-05 Thread Harpo
Hello all! I am having trouble running a program I am writing without using a script. Here is what I am using to compile. dmd main.d fileloader.d tokenizer.d globals.d namefunctions.d misc.d math.d questions.d functions.d -L-ldl -gc Then in a runner script I have this. LD_LIBRARY_PATH=. ./ma

Re: D to C++ DLL

2014-03-13 Thread Harpo
Perfect Thanks!

D to C++ DLL

2014-03-13 Thread Harpo
Hello all! I am having trouble with using a c++ shared object file with D. I am running Linux Mint 32 bit. I am using the 32 bit version of DMD. For some reason any extra variables I pass to the C++ function have the value 0. Even when I specifically pass it something else. ---