WINE + Win32 build = WOW!

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Marty_D
Posts: 0
Joined: Mon Jun 09, 2003 11:16 pm

Post by Marty_D » Wed Jul 26, 2006 2:13 pm

hi lazareus. Thanks for the input. Acutally no, the path to Advapi32.lib wasn't present so I added that to [Tools/Projects and Solutions/VC++ Directories]. The file is located at C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib and I didn't know the environment variable for the SDK so I just added the full path.

Didn't seem to help though. Still getting lots of "unresolved external symbol" errors. Is there maybe somewhere else the statement should be added?

here's the output

Code: Select all

1>------ Build started: Project: blender, Configuration: Blender Release Win32 ------
1>Linking...
1>buildinfo.obj : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
1>   Creating library ..\..\bin\blender.lib and object ..\..\bin\blender.exp
1>bli_blenlib.lib(winstuff.obj) : error LNK2001: unresolved external symbol __imp__RegCloseKey@4
1>qtmlClient.lib(QTLoadLibraryUtils.obj) : error LNK2001: unresolved external symbol __imp__RegCloseKey@4
1>bre_yafray.lib(export_File.obj) : error LNK2001: unresolved external symbol __imp__RegCloseKey@4
1>bre_yafray.lib(export_Plugin.obj) : error LNK2001: unresolved external symbol __imp__RegCloseKey@4
1>bli_blenlib.lib(winstuff.obj) : error LNK2001: unresolved external symbol __imp__RegSetValueExA@24
1>bli_blenlib.lib(winstuff.obj) : error LNK2001: unresolved external symbol __imp__RegCreateKeyExA@36
1>bl_src.lib(usiblender.obj) : error LNK2001: unresolved external symbol __imp__SHGetSpecialFolderPathA@16
1>bl_src.lib(drawtext.obj) : error LNK2001: unresolved external symbol __imp__CloseClipboard@0
1>bl_src.lib(drawtext.obj) : error LNK2001: unresolved external symbol __imp__GetClipboardData@4
1>bl_src.lib(drawtext.obj) : error LNK2001: unresolved external symbol __imp__OpenClipboard@4
1>bl_src.lib(drawtext.obj) : error LNK2001: unresolved external symbol __imp__SetClipboardData@8
1>bl_src.lib(drawtext.obj) : error LNK2001: unresolved external symbol __imp__EmptyClipboard@0
1>bl_src.lib(writeavicodec.obj) : error LNK2001: unresolved external symbol __imp__SetRect@20
1>qtmlClient.lib(ClientToolboxAPI.obj) : error LNK2001: unresolved external symbol __imp__wsprintfA
1>qtmlClient.lib(QTLoadLibraryUtils.obj) : error LNK2001: unresolved external symbol __imp__RegQueryValueExA@24
1>bre_yafray.lib(export_File.obj) : error LNK2001: unresolved external symbol __imp__RegQueryValueExA@24
1>bre_yafray.lib(export_Plugin.obj) : error LNK2001: unresolved external symbol __imp__RegQueryValueExA@24
1>qtmlClient.lib(QTLoadLibraryUtils.obj) : error LNK2001: unresolved external symbol __imp__RegOpenKeyExA@20
1>bre_yafray.lib(export_File.obj) : error LNK2001: unresolved external symbol __imp__RegOpenKeyExA@20
1>bre_yafray.lib(export_Plugin.obj) : error LNK2001: unresolved external symbol __imp__RegOpenKeyExA@20
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4
1>libghost.lib(GHOST_DisplayManagerWin32.obj) : error LNK2001: unresolved external symbol __imp__GetSystemMetrics@4
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__DispatchMessageA@4
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__TranslateMessage@4
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__PeekMessageA@20
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__GetCursorPos@4
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__SetCursorPos@8
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__GetKeyState@4
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__DefWindowProcA@16
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__ValidateRect@8
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__GetWindowLongA@8
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__RegisterClassA@4
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__GetStockObject@4
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__LoadCursorA@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__LoadCursorA@8
1>libghost.lib(GHOST_SystemWin32.obj) : error LNK2001: unresolved external symbol __imp__LoadIconA@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__UpdateWindow@4
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__ShowWindow@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__GetDC@4
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowLongA@12
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__CreateWindowExA@48
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__DestroyWindow@4
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__ReleaseDC@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__DestroyCursor@4
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowTextA@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__GetWindowTextA@12
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__GetWindowRect@8
1>libghost.lib(GHOST_DisplayManagerWin32.obj) : error LNK2001: unresolved external symbol __imp__GetWindowRect@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__GetClientRect@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowPos@28
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__IsZoomed@4
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__IsIconic@4
1>libghost.lib(GHOST_DisplayManagerWin32.obj) : error LNK2001: unresolved external symbol __imp__IsIconic@4
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__ScreenToClient@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__ClientToScreen@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__SetWindowPlacement@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__GetWindowPlacement@8
1>libghost.lib(GHOST_DisplayManagerWin32.obj) : error LNK2001: unresolved external symbol __imp__GetWindowPlacement@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__SwapBuffers@4
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__InvalidateRect@12
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__ReleaseCapture@0
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__SetCapture@4
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__SetCursor@4
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__ShowCursor@4
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__GetForegroundWindow@0
1>openal_static.lib(ALc.obj) : error LNK2001: unresolved external symbol __imp__GetForegroundWindow@0
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__CreateCursor@28
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__ChoosePixelFormat@8
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__DescribePixelFormat@16
1>libghost.lib(GHOST_WindowWin32.obj) : error LNK2001: unresolved external symbol __imp__SetPixelFormat@12
1>libghost.lib(GHOST_DisplayManagerWin32.obj) : error LNK2001: unresolved external symbol __imp__SystemParametersInfoA@16
1>libghost.lib(GHOST_DisplayManagerWin32.obj) : error LNK2001: unresolved external symbol __imp__IntersectRect@12
1>libghost.lib(GHOST_DisplayManagerWin32.obj) : error LNK2001: unresolved external symbol __imp__OffsetRect@12
1>libghost.lib(GHOST_DisplayManagerWin32.obj) : error LNK2001: unresolved external symbol __imp__GetDCOrgEx@8
1>libghost.lib(GHOST_DisplayManagerWin32.obj) : error LNK2001: unresolved external symbol __imp__GetClipBox@8
1>libghost.lib(GHOST_DisplayManagerWin32.obj) : error LNK2001: unresolved external symbol __imp__EnumDisplaySettingsA@12
1>libghost.lib(GHOST_DisplayManagerWin32.obj) : error LNK2001: unresolved external symbol __imp__ChangeDisplaySettingsA@8
1>ftf_ftfont.lib(FTF_TTFont.obj) : error LNK2001: unresolved external symbol "public: float __thiscall FTFont::Advance(unsigned short const *)" (?Advance@FTFont@@QAEMPBG@Z)
1>ftf_ftfont.lib(FTF_TTFont.obj) : error LNK2001: unresolved external symbol "public: void __thiscall FTFont::BBox(unsigned short const *,float &,float &,float &,float &,float &,float &)" (?BBox@FTFont@@QAEXPBGAAM11111@Z)
1>openal_static.lib(ALc.obj) : error LNK2001: unresolved external symbol __imp__CoCreateInstance@20
1>openal_static.lib(ALc.obj) : error LNK2001: unresolved external symbol __imp__CoInitialize@4
1>openal_static.lib(ALc.obj) : error LNK2001: unresolved external symbol __imp__PostThreadMessageA@16
1>openal_static.lib(ALc.obj) : error LNK2001: unresolved external symbol __imp__CoUninitialize@0
1>openal_static.lib(ALc.obj) : error LNK2001: unresolved external symbol __imp__GetMessageA@16
1>..\..\bin\blender.exe : fatal error LNK1120: 71 unresolved externals
1>Build log was saved at "file://c:\blenderdev\build\msvc_7\source\blender\BuildLog.htm"
1>blender - 86 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 33 up-to-date, 0 skipped ==========
As you may have noticed, I've added the "Enable link-time code generation (/GL)" whole program optimization, but the errors were present before that option was set.

Lazareus
Posts: 0
Joined: Sun Jul 23, 2006 5:24 am

Post by Lazareus » Wed Jul 26, 2006 4:47 pm

I looked around a little more, and I'm still convinced that advapi32.lib is key to your issue. I'm no wiz with VC, but in your project options somewhere is a place you can add specific lib files to be linked w/ your code. add advapi32.lib there.
Hope that helps.

Lazareus
Posts: 0
Joined: Sun Jul 23, 2006 5:24 am

Post by Lazareus » Wed Jul 26, 2006 5:45 pm

Hello!
This is off topic regarding your issue, but I noticed you had advice for someone in another thread, AND that mchs3d has been watching here.

I'm trying to build Blender w/ SSE2 extensions, and it doesn't seem to be working. I know this (or believe it anyway) because the binary produced runs on my Sempron system. It should crash, w/ "illegal instruction" error, right?
I'm using scons, w/ these flags:
'-O3', '-march=pentium4','-mmmx','-msse2','-mfpmath=sse'
So far I have tried setting these flags on the REL_CCFLAGS, REL_CFLAGS, and the CCFLAGS variables, and nothing seems to make a diff.
Have I completely misunderstood something? Thanks in advance... :-)

Marty_D
Posts: 0
Joined: Mon Jun 09, 2003 11:16 pm

Post by Marty_D » Wed Jul 26, 2006 7:25 pm

hmm, don't think you should crash. AMD has built in support for SSE2. And, if you have a Sempron you probably don't want Pentium flags as they'll slow you down. -m flags are for, glaa I forget. -march is for architecture, -mmmx is multimedia extensions. Sempron is, I THINK, -mk8, -m3dnow. Something like that. I found these by doing a man gcc in Cygwin which was unholy slow.
Burre wrote:Add these library dependencies to the blender-project: ole32.lib Advapi32.lib gdi32.lib user32.lib and add the platform SDK as an additional library-directory to that project
The above would seem to confirm your suspicions. Unfortunately I'm not aware of how depencies are added in VC Express. Thanks for the tip, I'll have to do some research.

Lazareus
Posts: 0
Joined: Sun Jul 23, 2006 5:24 am

Post by Lazareus » Wed Jul 26, 2006 7:39 pm

Project menu, References. Expand Config. Props., then Linker.
Click "Command Line". To right, in add. options, add advapi32.lib.

Probably need those others too, if Burre says so, but personally I would wait till the compiler complained some more, just to avoid bulking up the binary unnecessarily.

So, a binary built for the wrong instruction set won't crash? hmmm.
Oh well, ain't the first time I been confused. :-)

Hope that helps.

Marty_D
Posts: 0
Joined: Mon Jun 09, 2003 11:16 pm

Post by Marty_D » Wed Jul 26, 2006 8:11 pm

Ah, found it. Now I see why the path needs to be there too. Thanks.

Still getting errors so have to do some more science. glah.

Regarding architectural incompatibility; yah if you try to run an apple program in Windows you'll find things don't get along so well, but AMD is founded on Intel's basic infrastructure so that's probably why you're still up and running. I'd guess anyway.

Not too sure where the flags are set anymore with scons. user-config.py somewhere yes, but . . maybe someone else around here is using that and can clear that up.

Thanks again. much appreciated.

Lazareus
Posts: 0
Joined: Sun Jul 23, 2006 5:24 am

Post by Lazareus » Wed Jul 26, 2006 9:56 pm

Actually, thinking about it some more made me realize it's quite possible. I might have poke around in blender for quite awhile before I encounter an operation that actually got optimized into really processor specific instructions. Most of the heavy lifting that requires that kind of optimization is done for blender by external system libraries so no issue there. Mostly what compiling for the wrong architecture will do for you is cause the software to run slower because the code is arranged for different numbers of CPU 'pipeline's so to speak, but it should still run.

I found info on where in user-config.py to put blenders settings, thanks!

Post Reply