-
-
Notifications
You must be signed in to change notification settings - Fork 458
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows 10 Visual Studio 2015 build: LNK2019 with WrappedMethod1, register_class, and register_method. #12
Comments
I'm GUESSING the cause of the issue comes from the need for step 8 in the first place...? I tried re-generating the bindings and they result in content that is naturally positioned at the wrong #include path. Either that's just a separate bug, or it's causing issues in the linking somehow(?). |
Well as for me I thing this happens with Linux rules 🐧 |
godot_cpp_starter_kit.zip |
Hey @willnationsdev , thanks for trying this out!
Furthermore you need to place the |
Okay, so I put I then added both Do I need to have the |
I think you only need to link the .lib files. All three of them though. For "just get it running" you could dump everything in the project root, all the dll and lib files and see if it works. |
Yeah, that's what I did. I tried it with the project root (where my .sln is) and the source root (where my .cpp is). In each location, I had the following files:
I tried it first one way, and then the other way (I never had all 6 files in both locations at once). There are not 3 .lib files though. Nowhere during my process is a Edit: |
Ah! It finally worked! I accidentally didn't add I ended up having everything placed directly into However, we still need to make it clear how someone is supposed to get that .lib aside from just downloading it from the starter kit. Shouldn't it be retrievable or generatable from the cpp_bindings repo? I'm going to tinker around with actually getting it included and running in a Godot project and update you all. |
@willnationsdev that starter kit is ouuuuutdated by the way, don't use it 😄 This will be a lot easier once we have a version we can agree on and distribute binaries. |
Fix print file list
Context:
Windows 10
Visual Studio 2015 Community Edition
All command line operations executed using "Visual Studio x64 Native Tools Command Prompt"
Issue:
Got all the way through the tutorial on the README.md up to the clang operations. Built a VS project for DLLs and got to the Linker stage, but started running into issues.
Reproducible Steps:
Initial Directory Structure
. (Current folder)
= godot (the actual godot engine fork)
== bin
= gdtest (the "test" folder we'll be operating in)
== cpp_bindings (just cloned)
== godot_headers (just cloned)
== lib (empty)
== src (empty)
Go into cpp_bindings, open SConstruct file, change the godot_bin_path and godot_lib_path variables to each have as their value: "../../godot/bin/"
From the cpp_bindings (executes successfully, creating godot_cpp_core.lib/.exp/.dll in cpp_bindings/bin):
$ scons p=windows
From the cpp_bindings (executes successfully, creating godot_cpp_bindings.lib/.exp/.dll in cpp_bindings/bin):
$ scons p=windows target=bindings generate_bindings=yes
Open visual studio. File > New > Project... . Select Win32 Application, project name gdtestdll, location is the gdtest directory. Checkbox "Create directory for solution". Select "Next" in the Win32 Application Wizard. Select DLL. Click the "Empty Project" checkbox. Click "Finish".
Right Click "Source Files" in Solution Explorer, Add.. > New item. C++ source file called "init.cpp" to be placed in the project directory (gdnative/gdtestdll/gdtestdll). Copy/Paste the contents of the GitHub version into the file.
Right Click "gdtestdll" in the Solution Explorer, Properties. Ensure that you are using All Configurations and All Platforms at the top.
Remaining errors in the Visual Studio Output:
The text was updated successfully, but these errors were encountered: