Problem with compiling

I’m running 64bit Windows Vista, and I wanted to have my custom splashscreen in blender, so I decided to get the blender source code and start compiling.

well I’m at the step where I change the splash screen, using Dev cpp I entered the command (in the command line)

cpp -o datatoc datatoc.c

here the problem, when i enter:

datatoc splash.jpg

it gives me an error that the program datatoc isn’t compatible with x64 version of windows… someone give me an awnser before i go and kill Bill Gates because all my hard work has been wasted…

EDIT: Problem resolved

Instead of using MingW to do 64bit compiles, I suggest you install VC++ 2008 Express (which is used to build our official releases too). See if the problem persists - unfortunately, I still can’t verify this type of problems, as I still don’t have a 64bit windows install for myself (although I have 64bit machines).

/Nathan

cpp is not the compiler…odd I know, but it’s true. The GCC (and Dev-C++) compiler is actually gcc or g++ (if you explicitly want to force the use of the C++ compiler). So what you are currently doing is trying to execute a text file, and that doesn’t work so well.

CPP is the “C Pre Processor” and it does stuff like resolve macros, include files, etc. So the normal compile path is like this:

source code -> CPP -> GCC -> ld -> executable

Thankfully you don’t have to do all that by hand simply doing:

gcc -o datatoc datatoc.c

will be what you want.

But since you’re on windows, you may need to use .exe on the output file namem, you may not though, it’s been about a year since I really worked with gcc on winodows:

gcc -o datatoc.exe datatoc.c

BTW, I think the splashscreen .c file gets regenerated each time Blender is recompiled, so simply overwriting the old slash may be enough.

I don’t think that that is true. The .jpg in blender/release/datafiles doesn’t do anything. You have to run datatoc first to make spash.jpg.c and put that in blender/source/blender/src. At least that’s what I thought!

Correct.

/Nathan

thanks for all your help! I’ll try it with the command g++ instead now…

EDIT: now I get this error:

scons: *** [C:\build\win32-mingw\intern\ghost\intern\GHOST_SystemWin32.o] Error
1
scons: building terminated because of errors.

That error message is not very helpful - is it the first and only one you get?

If yes, then you might have incomplete paths (possible on Vista). I had to add to my path C:\MingW\libexec\mingw\3.4.2\gcc - check the libexec dir of your mingw installation and see if you can go into a similar path. Add that with ie. SET PATH=C:\MingW\libexec\mingw\3.4.2\gcc;%PATH% prior to building with scons

An error should happen also with running gcc on datatoc (cc1plus.exe not found or something like that).

/Nathan

that wasn’t the only line, but I thought that would be the main problem causing the crash, here is from where I noticed the errors starting…:

cc1plus.exe: warning: command line option "-Wdeclaration-after-statement" is val
id for C/ObjC but not for C++
intern\ghost\intern\GHOST_SystemWin32.cpp:41: warning: ignoring #pragma warning

In file included from intern\ghost\intern\/GHOST_System.h:41,
                 from intern\ghost\intern\/GHOST_SystemWin32.h:42,
                 from intern\ghost\intern\GHOST_SystemWin32.cpp:43:
intern\ghost\intern\/GHOST_EventManager.h:37: warning: ignoring #pragma warning

In file included from intern\ghost\intern\/GHOST_DisplayManagerWin32.h:40,
                 from intern\ghost\intern\GHOST_SystemWin32.cpp:67:
intern\ghost\intern\/GHOST_DisplayManager.h:39: warning: ignoring #pragma warnin
g
In file included from intern\ghost\intern\GHOST_SystemWin32.cpp:74:
intern\ghost\intern\/GHOST_TimerManager.h:37: warning: ignoring #pragma warning

In file included from intern\ghost\intern\GHOST_SystemWin32.cpp:75:
intern\ghost\intern\/GHOST_WindowManager.h:37: warning: ignoring #pragma warning

In file included from intern\ghost\intern\GHOST_SystemWin32.cpp:76:
intern\ghost\intern\/GHOST_WindowWin32.h:45:20: wintab.h: No such file or direct
ory
intern\ghost\intern\/GHOST_WindowWin32.h:48:20: pktdef.h: No such file or direct
ory
In file included from intern\ghost\intern\GHOST_SystemWin32.cpp:76:
intern\ghost\intern\/GHOST_WindowWin32.h:51: error: expected `)' before '*' toke
n
intern\ghost\intern\/GHOST_WindowWin32.h:51: error: expected `,' or `;' before '
*' token
intern\ghost\intern\/GHOST_WindowWin32.h:52: error: ISO C++ forbids declaration
of `HCTX' with no type
intern\ghost\intern\/GHOST_WindowWin32.h:52: error: typedef `HCTX' is initialize
d (use __typeof__ instead)
intern\ghost\intern\/GHOST_WindowWin32.h:52: error: `API' was not declared in th
is scope
intern\ghost\intern\/GHOST_WindowWin32.h:52: error: `GHOST_WIN32_WTOpen' was not
 declared in this scope
intern\ghost\intern\/GHOST_WindowWin32.h:52: error: expected `,' or `;' before '
(' token
intern\ghost\intern\/GHOST_WindowWin32.h:53: error: expected `)' before '*' toke
n
intern\ghost\intern\/GHOST_WindowWin32.h:53: error: expected `,' or `;' before '
*' token
intern\ghost\intern\/GHOST_WindowWin32.h:54: error: expected `)' before '*' toke
n
intern\ghost\intern\/GHOST_WindowWin32.h:54: error: expected `,' or `;' before '
*' token
intern\ghost\intern\GHOST_SystemWin32.cpp: In member function `virtual GHOST_TSu
ccess GHOST_SystemWin32::getCursorPosition(GHOST_TInt32&, GHOST_TInt32&) const':

intern\ghost\intern\GHOST_SystemWin32.cpp:235: warning: unused variable 'success
'
intern\ghost\intern\GHOST_SystemWin32.cpp: In static member function `static LRE
SULT GHOST_SystemWin32::s_wndProc(HWND__*, UINT, WPARAM, LPARAM)':
intern\ghost\intern\GHOST_SystemWin32.cpp:653: error: `WT_PACKET' undeclared (fi
rst use this function)
intern\ghost\intern\GHOST_SystemWin32.cpp:653: error: (Each undeclared identifie
r is reported only once for each function it appears in.)
intern\ghost\intern\GHOST_SystemWin32.cpp:656: error: `WT_CSRCHANGE' undeclared
(first use this function)
intern\ghost\intern\GHOST_SystemWin32.cpp:657: error: `WT_PROXIMITY' undeclared
(first use this function)

=====
scons: *** [C:\build\win32-mingw\intern\ghost\intern\GHOST_SystemWin32.o] Error
1
scons: building terminated because of errors.

wintab.h: No such file or directory

You’re missing the wintab sdk. The dependencies to build blender are provided in lib/windows (and lib/win64 for 64bit builds, but support for that in our scons is still incomplete). Make sure you have lib/windows checked out in the right place.

/Nathan

theres no folder named windows or win64 in C:\blender\lib

Using defaults, and provided your environment was set up already, here’s a short rundown. Let’s assume you’re using command-line svn, although it is easy to translate these instructions for use with tortoisesvn. We are now in a cmd.exe shell with properly configured environment:

$ cd C:\blenderdev
$ svn co https://svn.blender.org/svnroot/bf-blender/trunk/blender blender
$ svn co https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows lib/windows
$ cd blender
$ scons BF_TOOLSET=mingw

When the compilation process is finished you’ll find the ready-to-use binary in BF_INSTALLDIR which in this case will be C:\blenderdev\install\win32-mingw

As you can see, I checked out lib/windows to lib/windows, next to blender/ which was checked out in the previous step. This is where our build systems expect the dependencies to be (lib/windows), wintab among others.

/Nathan

what is the “co” for?

and should I end up with the directories C:\blender & C:\blender\lib\windows?

and are there supposed to be files in the lib folder? because there aren’t…

and it still doesn’t work, with prettty much the same error…

EDIT: I got it working, thanks jester king!

can someone help me, please?
i do not have the internet at home on my computer. i have to use the local library to download stuff.
can i build blender? i’m stuck at downloading with Tortoise.
do i need Tortoise? i’m not online at home.
can i download the Windows library some other way?