Re: Integrate NIM with C based project.

2019-10-06 Thread Lachu
I build Progress: Call to Power with nimble. Currently only change is use some pragmas, change main function name in C files to something else and add code, that calls this function. I will wrote articles how to convert such projects. I only partially test. I must start rewriting some part of co

Re: Integrate NIM with C based project.

2019-10-05 Thread Lachu
I just discovered NIM doesn't append a file extension to my library. -l linker argument gives linker name by omitting lib prefix and so extension. These are append automatically and linker will search lib names by matching it to result of mentioned operations. How to force nimc to generate file

Re: Integrate NIM with C based project.

2019-10-04 Thread Lachu
I got first step forward. I will update this thread for any other nim/nimble beginners. What I doing wrong? First impression I must put different configuration of compiler with relating submodules to separate directories was good, but I don't known how to order nimble to build more modules. My

Re: Integrate NIM with C based project.

2019-10-04 Thread Lachu
Sorry I'm answering in two post. My game is opensource. Sources are accessible on sourceforge.net. Game is called progress call to power. There is one problem. I must check I upload newest sources. Not everything working, so I won't mess up in repository.

Re: Integrate NIM with C based project.

2019-10-04 Thread Lachu
Re: up. Thanks for your response, but this doesn't solve my problem. Your told how to debug memory problems with nim app. You don't tell me how to connect C code with nim or how to solve memory problem in C code.

Re: Integrate NIM with C based project.

2019-10-03 Thread mratsim
> (heap overlaps stack, so one function jump outside one's bound). That seems very improbably. It's more likely that you have a stack overflow and while writing a stack variable you also overwrite the return instructions of your function. Is your code open-source? If you compile your code with

Integrate NIM with C based project.

2019-10-03 Thread Lachu
I tries to rewrite my project, called progress: call to power (game based on Freeciv) to nim, because I have memory problems (heap overlaps stack, so one function jump outside one's bound). I tries different approach. First was adding nim.cfg given bellow: cincludes:../c-files/common clibdir:.