Skip to content
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

Building the summator module from docs as shared module results in error #15675

Open
Tracked by #39196
Athomield opened this issue Jan 13, 2018 · 10 comments
Open
Tracked by #39196

Comments

@Athomield
Copy link

Athomield commented Jan 13, 2018

Godot version:

Master Branch from today (1/13/2018)

OS/device including version:

Win 10 | MSVC 2017 x64

Issue description:

So after succeeding in building the summator module as a static library (by following the docs) I tried to do the same thing but make the library shared instead.
This appears to work at first but it generates a library with a name that is repeated twice 'summator.windows.tools.64.windows.tools.64.lib' instead of 'summator.windows.tools.64.lib'.

I've had this error before and I thought it was just from me or it will be fixed soon. But it is still persistent.

This is the full error .

scons platform=windows summator_shared=yes scons: Reading SConscript files ... Detected MSVC compiler: amd64 Compiled program architecture will be a 64 bit executable (forcing bits=64). Checking for C header file mntent.h... (cached) no scons: done reading SConscript files. scons: Building targets ... [ 97%] �[91mLinking Program �[95m==> �[93mbin\godot.windows.tools.64.exe�[0m LINK : fatal error LNK1181: cannot open input file 'summator.windows.tools.64.windows.tools.64.lib' scons: *** [bin\godot.windows.tools.64.exe] Error 1181 scons: building terminated because of errors.

Steps to reproduce:
Following the docs http://docs.godotengine.org/en/latest/development/cpp/custom_modules_in_cpp.html#creating-a-new-module using an MSVC 2017 compiler will reproduce this.

Minimal reproduction project:

@ghost ghost added this to the 3.0 milestone Jan 14, 2018
@akien-mga
Copy link
Member

Any Windows user to debug this and see if it's maybe just a documentation issue? (@vnen maybe? :))

@vnen
Copy link
Member

vnen commented Jan 18, 2018

Yes, this is a documentation problem because the doc author never considered MSVC when he wrote it.

The issue is that it's trying to link with summator.windows.tools.64.windows.tools.64.lib, which is a bogus name (part of it is repeated).

I think you can replace env.Append(LIBS=[shared_lib_shim]) with simply env.Append(LIBS=["summator"]). Will try to test this later.

@akien-mga akien-mga modified the milestones: 3.0, 3.1 Jan 19, 2018
@akien-mga
Copy link
Member

Retagging as documentation issue then, and definitely not critical for 3.0.

@vnen
Copy link
Member

vnen commented Jan 19, 2018

Eh, I don't know how that shared lib works at all. I essentially get the same as https://godotengine.org/qa/16495/getting-c-to-compile-as-a-shared-object-dll and it makes sense to act as such, since it references stuff that are inside the Godot source but are not added to the shared lib. I don't know enough to understand how this works with GCC.

@Athomield
Copy link
Author

Athomield commented Apr 9, 2018

Is this issue very hard to solve ? Can I get some insight maybe ill try to see what I can do.

@akien-mga akien-mga modified the milestones: 3.1, 3.2 Jan 26, 2019
@akien-mga akien-mga self-assigned this Jan 26, 2019
@logicor-cn
Copy link

logicor-cn commented Jan 29, 2019

I figured out how to get DLL built: godotengine/godot-docs#2099.

@akien-mga It is more than just documentation, see my comment in the other issue for details.

However, I got segfault when starting up the editor with dll built: #25448

@akien-mga akien-mga modified the milestones: 3.2, 4.0 Nov 14, 2019
@axsaucedo
Copy link

I can confirm this is still an issue in 3.2.3-stable

@brno32
Copy link
Contributor

brno32 commented Nov 30, 2023

still getting this in master

following the instructions in the docs gives
[100%] LINK : fatal error LNK1181: cannot open input file 'modules\module_summator.windows.editor.x86_64.lib'

@mvccogo
Copy link

mvccogo commented Dec 22, 2023

Still an issue in master. Is there any known fix for this? I need to access some low-level APIs from Godot such as the PhysicsServer that cannot be accessed by using a GDExtension, and recompiling the whole engine everytime is definitely not ideal.

@DanielSnd
Copy link
Contributor

Still an issue in master. Is there any known fix for this? I need to access some low-level APIs from Godot such as the PhysicsServer that cannot be accessed by using a GDExtension, and recompiling the whole engine everytime is definitely not ideal.

I'm also running into this issue on windows. I'm considering installing linux as a dual boot and using linux when developing the module I'm working on ._.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants