GodotSteam icon indicating copy to clipboard operation
GodotSteam copied to clipboard

(win7) Compiler can't find steam_api.lib

Open Kermer opened this issue 9 years ago • 7 comments

Can't compile on windows (both 32 and 64bits) g++: error: steam_api64.lib: No such file or directory (steam_api.lib for 32bit)

It's probably just a libs path issue in config.py, but didn't manage to make it work. Tried "" and "" instead of "/", still the same error.

Kermer avatar Jan 07 '16 20:01 Kermer

On Windows you must compile with Visual C++ only (can't use mingw) because *.lib is for Microsoft C++ only not for mingw (gcc, g++).

Mavhod avatar Jan 08 '16 00:01 Mavhod

Installed VS 2013 Pro. Now I get

Creating library bin\godot.windows.opt.tools.64.lib and object bin\godot.wind
ows.opt.tools.64.exp
modules.windows.opt.tools.64.lib(godotsteam.windows.opt.tools.64.obj) : error LN
K2019: unresolved external symbol __imp__SteamAPI_Shutdown referenced in functio
n "public: virtual __thiscall GodotSteam::~GodotSteam(void)" (??1GodotSteam@@UAE
@XZ)
modules.windows.opt.tools.64.lib(godotsteam.windows.opt.tools.64.obj) : error LN
K2019: unresolved external symbol __imp__SteamAPI_Init referenced in function "p
ublic: bool __thiscall GodotSteam::init(void)" (?init@GodotSteam@@QAE_NXZ)
bin\godot.windows.opt.tools.64.exe : fatal error LNK1120: 2 unresolved externals

scons: *** [bin\godot.windows.opt.tools.64.exe] Error 1120
scons: building terminated because of errors.

When using mingw you can also get similar errors if you just drop .lib file inside main folder (instead of inside a module)

=====
modules\libmodules.windows.opt.tools.64.a(godotsteam.windows.opt.tools.64.o):god
otsteam.cpp:(.text+0x8): undefined reference to `_imp__SteamAPI_Init'
modules\libmodules.windows.opt.tools.64.a(godotsteam.windows.opt.tools.64.o):god
otsteam.cpp:(.text+0x35): undefined reference to `_imp__SteamAPI_Shutdown'
collect2.exe: error: ld returned 1 exit status

=====
scons: *** [bin\godot.windows.opt.tools.64.exe] Error 1
scons: building terminated because of errors.

Kermer avatar Jan 08 '16 03:01 Kermer

Hmm... Managed to compile both 32 and 64bit using default steam_api ( redistributable_bin/steam_api.dll and .lib ). Still can't compile 64b as I should, but it seem to work fine with default lib.

Kermer avatar Jan 08 '16 05:01 Kermer

Windows 64bit you must compile with console "VS2013 x64 Cross Tools Command Prompt" but now the last Godot version in Github is compile error in this cmd.

Mavhod avatar Jan 08 '16 20:01 Mavhod

Managed to compile it using MinGW!

VisualStudio requires env.Append(LINKFLAGS=["filename.lib"]) while MinGW requires env.Append(LIBS=["filename"])

So changing LINKFLAGS to LIBS inside config.py will allow to compile with MinGW :wink:

If I find out how to check which one is used to compile I'll update the config

Kermer avatar Jan 10 '16 04:01 Kermer

Could anyone release a compiled version? I do not know how to compile.

techcomgame avatar Feb 10 '17 22:02 techcomgame

You can read about compiling godot in godot wesite: http://docs.godotengine.org/en/stable/reference/_compiling.html

Mavhod avatar Feb 11 '17 05:02 Mavhod