Giter Site home page Giter Site logo

Comments (7)

zetashift avatar zetashift commented on July 16, 2024

What Nim version are you using? You should use 0.18.0 and you can install using nimble using the command nimble install godot

Edit: also make sure you have a environment variable named GODOT_BIN pointing to your godot executable location.

from godot-nim.

abraaofilho10 avatar abraaofilho10 commented on July 16, 2024

I'm using choosenim with version 0.18.0. I tried to install with "nimble install godot" but when I compile the stub project with "nake build" I got the following error:

/home/user/.nimble/pkgs/godot-0.7.17/godotapigen.nim(9,` 26) Error: type mismatch: got <string>
but expected one of: 
proc getIdent(ic: IdentCache; identifier: string): PIdent
proc getIdent(ic: IdentCache; identifier: string; h: Hash): PIdent
proc getIdent(ic: IdentCache; identifier: cstring; length: int; h: Hash): PIdent

expression: getIdent(ident)

I saw it is the same error as #41 but I couldn't find a solution, then I tried to use godot-nim 0.7.8 that gives me this other error:

nakefile.nim(5, 8) Error: cannot open 'godotapigen'

My .bash_profile has this as GODOT_BIN:

export GODOT_BIN=$HOME/Godot3/Godot_v3.0.6-stable_x11.64

from godot-nim.

zetashift avatar zetashift commented on July 16, 2024

Yeah, use nimble and you can solve that getIdent error with doing some trickey explained here: #32 (comment)

after that nake clean and nake build in the godot-nim-stub
I had the same getIdent error and I solved it by following that thread, clean install of 0.18.0, nimble install in the toolchain folder and nake clean. If you still have trouble, I'll try to replicate it and solve it again and write down the steps, as I don't remember correctly what I did exactly.

from godot-nim.

abraaofilho10 avatar abraaofilho10 commented on July 16, 2024

I didn't know that I needed to do "nimble install" after installing a nim version. Is this in the documentation?

I did the following but I couldn't get it to work.
I deleted .choosenim/toolchains/nim-0.18.0 and .nimble/pkgs/compiler-0.18.0 and ./nimble/pkgs/godot-0.7.17

$ choosenim 0.18
(...)
Extracting nim-0.18.0.tar.xz
Building Nim 0.18.0
Building tools (nimble, nimgrep, nimsuggest)
Info: Version 0.18.0 already selected
[user@localhost nim-0.18.0]$ nimble install
Verifying dependencies for [email protected]
Installing [email protected]
Success: compiler installed successfully.
[user@localhost nim-0.18.0]$ nimble install godot
Downloading https://github.com/pragmagic/godot-nim using git

Warning: Package 'godot' has an incorrect structure. It should contain a single directory hierarchy for source files, named 'godot', but file 'godotnim.nim' is in a directory named 'nim' instead. This will be an error in the future.

Hint: If 'nim' contains source files for building 'godot', rename it to 'godot'. Otherwise, prevent its installation by adding `skipDirs = @["nim"]` to the .nimble file.
  Verifying dependencies for [email protected]
      Info: Dependency on compiler@>= 0.17.3 already satisfied
  Verifying dependencies for [email protected]
 Installing [email protected]
   Success: godot installed successfully.
[user@localhost nim-0.18.0]$ cd /home/user/Downloads/godot-nim-stub-master
[user@localhost godot-nim-stub-master]$ nake clean
Compiling nakefile...
Hint: used config file '/home/user/.choosenim/toolchains/nim-0.18.0/config/nim.cfg' [Conf]
Hint: used config file '/home/user/Downloads/godot-nim-stub-master/nakefile.nim.cfg' [Conf]
(...)
Hint: rodutils [Processing]
/home/user/.nimble/pkgs/godot-0.7.17/godotapigen.nim(9, 26) Error: type mismatch: got <string>
but expected one of: 
proc getIdent(ic: IdentCache; identifier: string): PIdent
proc getIdent(ic: IdentCache; identifier: string; h: Hash): PIdent
proc getIdent(ic: IdentCache; identifier: cstring; length: int; h: Hash): PIdent

expression: getIdent(ident)

from godot-nim.

zetashift avatar zetashift commented on July 16, 2024

The nimble install thing is a weird thing that just seemed to work

Alright let's see if I can reproduce my solution
-> Clean install with choosenim
-> nimble install godot
-> nimble install nake

Now if I run nake clean I actually get the Pident error. I went to .choosenim\toolchains\nim-0.18.0 and did nimble install then went to the godot-nim-stub and ran nake clean and nake build succesfully.
You did the same thing but installed godot-nim after the nimble install, maybe try to install it before hand? (Also make sure when you do the clean install that /user/.choosenim and user/.nimble aren't present beforehand)

from godot-nim.

abraaofilho10 avatar abraaofilho10 commented on July 16, 2024

It worked nicely. Thank you very much! =)

Steps:
deleted .nimble folder and .choosenim folder

curl https://nim-lang.org/choosenim/init.sh -sSf | sh

choosenim 0.18.0

nimble install

nimble install godot

nimble install nake

nake clean

nake build

from godot-nim.

zetashift avatar zetashift commented on July 16, 2024

@chalcosoma I think you can close this sicne this issue will mostly likely be solved by 0.19+ compatibility.

from godot-nim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.