Building with LINK_ALL_STATIC=True fails

Hi,

I’m trying to build the latest CVS with MSVC9 on Win x64 as a suite of static libs using LINK_ALL_STATIC=True. The build fails on both x86 and x64 with the output:

[ 10%] Linking executable built/bin/interrogate.exe
libp3dtool.lib(dtoolutil_composite.obj) : error LNK2019: unresolved external sym
bol __imp_SHGetSpecialFolderPathA referenced in function "public: static class F
ilename const & __cdecl Filename::get_home_directory(void)" (?get_home_directory
@Filename@@SAAEBV1@XZ)
built/bin/interrogate.exe : fatal error LNK1120: 1 unresolved externals

On another note, i’ve tried to build the maya 2010 plugin (bulding panda normally as dlls using makepanda.bat --everything). Everything gets built but the maya plugin.

Can you help me address these 2 issues?

Thank you :slight_smile:

Hmm, looks like a makepanda bug? I didn’t even know that makepanda supported LINK_ALL_STATIC; I thought it was only for ppremake.

It looks like the library was compiled with the BUILDING_DLL defined, though it shouldn’t be for LINK_ALL_STATIC.

David

I added support for it to makepanda when I added support for the runtime builds.

I didn’t know it shouldn’t have BUILDING_XYZ defined, I thought LINK_ALL_STATIC would take care of that. (I couldn’t find anything in ppremake that undefined it. TBH, it works for me like this.)

In this particular case, it’s just that interrogate.exe needs to be linked to shell32.dll. Interrogate is not compiled in the case of the runtime so that’s why I didn’t catch this before. I’ve just checked in a fix.

I’ve updated the CVS and now it builds past the former linking errors. Unfortunately it fails again at 80% with the following output.

Started the build with “makepanda\makepanda.bat --nothing”

Just checked in a fix for that one.

Thank you for the fix but it still fails with the output:

[ 84%] Linking executable built/bin/pview.exe
   Creating library built/bin/pview.lib and object built/bin/pview.exp
libp3framework.lib(framework_composite.obj) : error LNK2019: unresolved external
 symbol "void __cdecl init_libpandaegg(void)" (?init_libpandaegg@@YAXXZ) referen
ced in function "public: void __cdecl PandaFramework::open_framework(int &,char
* * &)" (?open_framework@PandaFramework@@QEAAXAEAHAEAPEAPEAD@Z)
libp3framework.lib(framework_composite.obj) : error LNK2019: unresolved external
 symbol "void __cdecl init_libpandagl(void)" (?init_libpandagl@@YAXXZ) reference
d in function "public: void __cdecl PandaFramework::open_framework(int &,char *
* &)" (?open_framework@PandaFramework@@QEAAXAEAHAEAPEAPEAD@Z)
built/bin/pview.exe : fatal error LNK1120: 2 unresolved externals
Storing dependency cache.
Elapsed Time: 18 min 48 sec

Build terminated.

All right, try now.

It still fails.

[ 84%] Linking executable built/bin/pview.exe
   Creating library built/bin/pview.lib and object built/bin/pview.exp
libp3framework.lib(framework_composite.obj) : error LNK2019: unresolved external
 symbol "void __cdecl init_libpandagl(void)" (?init_libpandagl@@YAXXZ) reference
d in function "public: void __cdecl PandaFramework::open_framework(int &,char *
* &)" (?open_framework@PandaFramework@@QEAAXAEAHAEAPEAPEAD@Z)
built/bin/pview.exe : fatal error LNK1120: 1 unresolved externals