Page 1 of 2

### 3 compiler errors

Posted: Tue Nov 22, 2005 1:12 am
Hi there. I downloaded the latest CVS today and tried to build it. I used the free compiler Visual Studio 2005 express and I used the VC7 project files (after conversion). Include paths were missing everywhere, so I corrected them, and I installed Quicktime SDK. So far soo good. I tried to compile Blender Release but 3 of the projects won't build. This is my error log:

Code: Select all

------ Build started: Project: DNA_makesdna, Configuration: Blender Release Win32 ------
LINK : fatal error LNK1181: cannot open input file 'libguardedalloc.lib'
Build log was saved at "file://c:\Program Files\BlenderCVS\build\msvc_7\source\blender\makesdna\BuildLog.htm"
DNA_makesdna - 1 error(s), 0 warning(s)
------ Build started: Project: BL_src, Configuration: Blender Release Win32 ------
Compiling...
dna.c
c1 : fatal error C1083: Cannot open source file: '..\..\..\source\blender\makesdna\intern\dna.c': No such file or directory
Build log was saved at "file://c:\Program Files\BlenderCVS\build\msvc_7\source\blender\src\BuildLog.htm"
BL_src - 1 error(s), 0 warning(s)
------ Build started: Project: blender, Configuration: Blender Release Win32 ------
LINK : fatal error LNK1181: cannot open input file 'libsoundsystem.lib'
Build log was saved at "file://c:\Program Files\BlenderCVS\build\msvc_7\source\blender\BuildLog.htm"
blender - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 3 failed, 32 up-to-date, 0 skipped ==========
As you can see I'm missing 2 libs and one c-file. I'm guessing the c-file will be generated by makesdna, so solving the lib-errors should fix that one too (I guess). Where are these libs located? Couldn't find them in the lib-module or in QuickTimeSDK, are there more external SDKs? Also, the file ftgl_static.lib was called ftgl_static_ST.lib in the lib-module. If that is an error someone should fix it in the project file on the CVS.

Posted: Tue Nov 22, 2005 2:23 am
did you check out lib/windows also?

Also if you checked out CVS today someone broke the build with a python related commit, so you will get an error Py_bool undefined or something close to that,

LetterRip

### Re: 3 compiler errors

Posted: Tue Nov 22, 2005 8:27 am
Burre wrote:I used the free compiler Visual Studio 2005 express and I used the VC7 project files (after conversion). Include paths were missing everywhere, so I corrected them, and I installed Quicktime SDK. So far soo good. I tried to compile Blender Release but 3 of the projects won't build. This is my error log:
AFAIK the conversion of project files between the different doesn't always work right (or at all). Also, many of the developers "still" use older versions, so these newer ones are not always right away supported.
Burre wrote:

Code: Select all

------ Build started: Project: DNA_makesdna, Configuration: Blender Release Win32 ------
LINK : fatal error LNK1181: cannot open input file 'libguardedalloc.lib'
Build log was saved at "file://c:\Program Files\BlenderCVS\build\msvc_7\source\blender\makesdna\BuildLog.htm"
DNA_makesdna - 1 error(s), 0 warning(s)

Did you build first the internal libraries?
Burre wrote:

Code: Select all

------ Build started: Project: BL_src, Configuration: Blender Release Win32 ------
Compiling...
dna.c
c1 : fatal error C1083: Cannot open source file: '..\..\..\source\blender\makesdna\intern\dna.c': No such file or directory
Build log was saved at "file://c:\Program Files\BlenderCVS\build\msvc_7\source\blender\src\BuildLog.htm"
BL_src - 1 error(s), 0 warning(s)

This happens because of the failed first project. Because it failed, it didn't create the dna.c needed for BL_src.
Burre wrote:

Code: Select all

------ Build started: Project: blender, Configuration: Blender Release Win32 ------
LINK : fatal error LNK1181: cannot open input file 'libsoundsystem.lib'
Build log was saved at "file://c:\Program Files\BlenderCVS\build\msvc_7\source\blender\BuildLog.htm"
blender - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 3 failed, 32 up-to-date, 0 skipped ==========
This is again due to not built internal libs. If you *did* build them, then you should check the include path of the libraries.
Burre wrote: As you can see I'm missing 2 libs and one c-file. I'm guessing the c-file will be generated by makesdna, so solving the lib-errors should fix that one too (I guess). Where are these libs located? Couldn't find them in the lib-module or in QuickTimeSDK, are there more external SDKs? Also, the file ftgl_static.lib was called ftgl_static_ST.lib in the lib-module. If that is an error someone should fix it in the project file on the CVS.
If you built according the short guide found here: http://www.blender.org/cms/Building_wit ... 140.0.html (external libs, internal libs, blender proper) then it is a problem with the projectfiles, and those should be looked at. All built libraries should go to lib/windows. ftgl_static_ST.lib is the right name IIRC, but I've been a while out of the loop for several reasons. When I can I'll look into these issues.

/Nathan

Posted: Tue Nov 22, 2005 11:10 am
LetterRip wrote:did you check out lib/windows also?
Yes I did. That is where the "misspelled" lib were.
Also if you checked out CVS today someone broke the build with a python related commit, so you will get an error Py_bool undefined or something close to that,

LetterRip
Didn't notice anything like that. Seemed like all the projects built nicely except these three. But you can confirm that these two are internal libs?

EDIT:

I did an CVS Update just now and a full recompile of all the projects. Did end the same way, so the repository ain't broken. Result:

Code: Select all

========== Rebuild All: 32 succeeded, 3 failed, 4 skipped ==========
It is the same projects that fail, and with the same errors. I'm thinking that it might be that the dna-generation process was left out during the conversion to VC8 and that libguardedalloc and libsoundsystem are generated by BL_src (I'm just guessing, I'm not familiar with Blender's inner workings, but it seemes plausible since MEM_guardedalloc is an internal part of blender). In that case. Adding a pre-compile action to BL_src that generates a dna.c should solve the problem. Does anyone know how I might do that?

Posted: Tue Nov 22, 2005 3:03 pm
I solved the problem. A number of projects were not included in the VC7 solution (soundsystem, ghost, string etc). Also, I found out that STR_string.cpp needed 'toupper', wich is normally a part of stdlib.h but is now being deprecated and placed in ctype.h. Might be of interest to the developers for future compability (whenever VC8 will be officially supported). Also BulletDynamics (at least the release version) doesn't seem to output the lib to a directory that the blender project can find (had to add a path).

When all compiler errors have been solved I'm stuck with 143 linker errors. I have been trying to solve these but without result.

Output:

Code: Select all

bl_src.lib(drawtext.obj) : error LNK2019: unresolved external symbol __imp__CloseClipboard@0 referenced in function _txt_paste_clipboard
bl_src.lib(drawtext.obj) : error LNK2019: unresolved external symbol __imp__GetClipboardData@4 referenced in function _txt_paste_clipboard
bl_src.lib(drawtext.obj) : error LNK2019: unresolved external symbol __imp__OpenClipboard@4 referenced in function _txt_paste_clipboard
bl_src.lib(drawtext.obj) : error LNK2019: unresolved external symbol __imp__SetClipboardData@8 referenced in function _txt_copy_clipboard
bl_src.lib(drawtext.obj) : error LNK2019: unresolved external symbol __imp__EmptyClipboard@0 referenced in function _txt_copy_clipboard
bl_src.lib(writeavicodec.obj) : error LNK2019: unresolved external symbol __imp__SetRect@20 referenced in function _open_avi_codec_file
bli_blenlib.lib(winstuff.obj) : error LNK2019: unresolved external symbol __imp__RegCloseKey@4 referenced in function _RegisterBlendExtension
bre_yafray.lib(export_File.obj) : error LNK2001: unresolved external symbol __imp__RegCloseKey@4
bre_yafray.lib(export_Plugin.obj) : error LNK2001: unresolved external symbol __imp__RegCloseKey@4
...
... (Continuing like this)
...
..\..\bin\blender.exe : fatal error LNK1120: 121 unresolved externals
Build log was saved at "file://c:\Program Files\BlenderCVS\build\msvc_7\source\blender\BuildLog.htm"
blender - 143 error(s), 4 warning(s)
------ Skipped Build: Project: GP_axctl, Configuration: 3D Plugin Release Win32 ------
Project not selected to build for this solution configuration
========== Build: 0 succeeded, 1 failed, 52 up-to-date, 4 skipped ==========
Obviously my paths are messed up, but I'm not sure what they should be corrected to.

Posted: Tue Nov 22, 2005 5:20 pm
LetterRip wrote:Also if you checked out CVS today someone broke the build with a python related commit, so you will get an error Py_bool undefined or something close to that
Yes, I get the same error

Posted: Tue Nov 22, 2005 7:52 pm
How to solve this error?
We need to wait until the author upload the buged file fixed?

Posted: Wed Nov 23, 2005 7:52 am
Burre wrote:I solved the problem. A number of projects were not included in the VC7 solution (soundsystem, ghost, string etc).
As said, you need to build different projects (solutions) to get the proper dependencies built. extern/make/msvc_7_0/extern.sln and intern/make/msvc_7_0/intern.sln . intern.sln will give you soundsystem, ghost, etc. It was all in the document I linked you to.

/Nathan

Posted: Wed Nov 23, 2005 11:12 am
jesterKing wrote:As said, you need to build different projects (solutions) to get the proper dependencies built. extern/make/msvc_7_0/extern.sln and intern/make/msvc_7_0/intern.sln . intern.sln will give you soundsystem, ghost, etc. It was all in the document I linked you to.
Yes, that issue has been solved when I included the missing projects. I also tried to build them separately, as recommended in the guide, for good measure. Well, that didn't solve the linking problems. I still need help.

Posted: Wed Nov 23, 2005 2:31 pm
I had the same issues when linking. I am no coder (yet), so I couldnt get very far debugging it, but I looked in some detail at the first message.

It seemed the first file that had errors was the IMbuffer component, and it was looking for the tiff format libraries. So, I added the file it was looking for into the project, except then it couldnt find the 'tiffio' file (this wasnt anywhere in the CVS). My conclusion was that the tiff files had been taken out of blender (possibly replaced with "iff"), and that there was still a file left (accidently) in the project that was trying to call them...

Then there were lots of other linking errors also, but I didnt understand them, except there was one with the boolid (i think thats the name, am not on my dev system) librarys in the intern folder. At first they werent even built (in the build_all project), so it failed there, so I built them manually. Then there was a linking problem within them. Is this because the boolean librarys were just redone recently?

Also, I assume other MSVC 05 users have had this problem also, within virtually every project file is a line that says version="7.0". This line needs to be changed to version="7.00" before MSVC will assimilate them properly. This takes ages as there are at least 30 in different directories. Would it be possible to update the CVS to the fixed version?

Finally, which of the MSVC 7 or 6 files are more up to date? I might try to compare the two to try and find out which files are behind the linking problems... if I have any luck I will post it here

Thanks,
lightning

Posted: Wed Nov 23, 2005 2:33 pm
EDIT: after posting I got this
blender.org wrote:Failed sending email :: PHP ::

DEBUG MODE

Line : 234
File : emailer.php
just fyi

Posted: Wed Nov 23, 2005 9:15 pm
EDIT: Ignore what I said above, I have a feeling most of it was rubbish. Below are the errors I get from the linking:

UPDATED: see below

Code: Select all

------ Build started: Project: blender, Configuration: Blender Release Win32 ------
Creating library ..\..\bin\blender.lib and object ..\..\bin\blender.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
libjpeg.lib(jerror.o) : warning LNK4217: locally defined symbol __iob imported in function _output_message
libpng_st.lib(pngerror.o) : warning LNK4049: locally defined symbol __iob imported
libpng_st.lib(pngwutil.o) : warning LNK4049: locally defined symbol __iob imported
libpng_st.lib(pngrutil.o) : warning LNK4049: locally defined symbol __iob imported
creator.obj : error LNK2019: unresolved external symbol _libtiff_init referenced in function _main
bl_imbuf.lib(writeimage.obj) : error LNK2019: unresolved external symbol _imb_savetiff referenced in function _IMB_saveiff
bl_imbuf.lib(readimage.obj) : error LNK2019: unresolved external symbol _imb_loadtiff referenced in function _IMB_ibImageFromMemory
bl_imbuf.lib(util.obj) : error LNK2019: unresolved external symbol _imb_is_a_tiff referenced in function _IMB_ispic_name
bl_src.lib(usiblender.obj) : error LNK2019: unresolved external symbol _libtiff_exit referenced in function _exit_usiblender
libelbeem.lib(utilities.obj) : error LNK2019: unresolved external symbol "int globalBakeState" (?globalBakeState@@3HA) referenced in function "void __cdecl setGlobalBakeState(int)" (?setGlobalBakeState@@YAXH@Z)
libelbeem.lib(utilities.obj) : error LNK2019: unresolved external symbol "struct SDL_mutex * globalBakeLock" (?globalBakeLock@@3PAUSDL_mutex@@A) referenced in function "void __cdecl setGlobalBakeState(int)" (?setGlobalBakeState@@YAXH@Z)
..\..\bin\blender.exe : fatal error LNK1120: 7 unresolved externals
Build log was saved at "file://x:\bf-blender\build\msvc_7\source\blender\BuildLog.htm"
blender - 10 error(s), 5 warning(s)
========== Build: 1 succeeded, 1 failed, 33 up-to-date, 0 skipped ==========
Note: for example, if i comment out a bunch of things in the first file (tiff calls in writeimage.c) then it is removed from the error list. This isnt the ideal solution though, is it...

EDIT: I solved a bunch of solid errors (about 50) by adding the following to the linker dependancies:

Code: Select all

broad.lib
complex.lib
convex.lib
EDIT: 2 elbeem errors solved by adding the following files to the project:

Code: Select all

solver_*.cpp/h
ntl_world.cpp/h

And possibly a few more... note: I dont actually know which files are causing the problems, I am just adding everything that looks left out

Posted: Thu Nov 24, 2005 12:08 am
try again now, there were a few recent updates that broke the build a bit - you'll need to update your libs folder as well.

LetterRip

Posted: Thu Nov 24, 2005 12:11 am
also the msvc building methods are not officially supported, so they are a bit slower to update than scons and make which are our official build systems.

LetterRip

Posted: Thu Nov 24, 2005 1:33 am
Thanks LetterRip, after adding the new tiff/include folder to the include path and adding dynlibtiff.* to the BL_imbuf project that section built successfully, removing both all the tiff related errors at linking.

Also, the creator.c related error is gone.

However, the Elbeem related errors remain! I dont know the code well enough to tell where the errors point to, but they say something about "GlobalBake". I know there have been recent additions to the game engine bake and other baking scripts, but elbeem is the fluid engine; are the two connected somehow? Everything in the elbeem folder is being built, is the bakeing code elsewhere?

thanks
lightning