Building NSIS on Linux
Hi Guys,
I was immensely pleased to see that I could, in theory,
build NSIS installers under a Linux/POSIX gnu build infrastructure with a mingw cross-compiler... If only...
I'd appreciate any help:
SCons v0.96.91.D001
i386-mingw32msvc-gcc (GCC) 3.4.1 (mingw special)
i386-mingw32msvc-g++ (GCC) 3.4.1 (mingw special)
etc
So I simply:
'scons' and fairly immediately a problem:
i386-mingw32msvc-g++ -s -mwindows -Wl,--file-alignment,512 -Wl,-Map,build/release/BgImage/BgImage.map -Wl,-e_DllMain@12 -nostdlib -Wl,--exclude-libs,msvcrt.a -shared -o build/release/BgImage/BgImage.dll build/release/BgImage/BgImage.o SCons/Config/memcpy.c SCons/Config/memset.c -lkernel32 -luser32 -lgdi32 -lwinmm -Wl,--out-implib,build/release/BgImage/BgImage.lib -Wl,--output-def,build/release/BgImage/BgImage.def
Creating library file: build/release/BgImage/BgImage.lib
build/release/BgImage/BgImage.o(.eh_frame+0x11):BgImage.cpp: undefined reference to `___gxx_personality_v0'
collect2: ld returned 1 exit status
scons: *** [build/release/BgImage/BgImage.dll] Error 1
scons: building terminated because of errors.
So I see '-nostdlib' (and without really knowing what I'm doing, but knowing it's a symbol that the standard library provides), I remove this switch from SCons/Config/gnu:
defenv['NODEFLIBS_FLAG'] = '-Wl,--exclude-libs,msvcrt.a'
Progress... Lots of progress...
i386-mingw32msvc-gcc -o build/release/System/Source/System.o -c -Os -Wall -DSYSTEM_EXPORTS Contrib/System/Source/System.c
In file included from Contrib/System/Source/System.c:4:
Contrib/System/Source/stdafx.h:13:27: warning: no newline at end of file
Contrib/System/Source/System.c:8:20: crtdbg.h: No such file or directory
Contrib/System/Source/System.c: In function `PrepareProc':
Contrib/System/Source/System.c:372: warning: cast to pointer from integer of different size
Contrib/System/Source/System.c:636: warning: cast to pointer from integer of different size
Contrib/System/Source/System.c:665: warning: cast to pointer from integer of different size
Contrib/System/Source/System.c:688: warning: cast to pointer from integer of different size
Contrib/System/Source/System.c: In function `ParamsIn':
Contrib/System/Source/System.c:770: warning: cast to pointer from integer of different size
Contrib/System/Source/System.c: At top level:
Contrib/System/Source/System.c:872: warning: `naked' attribute directive ignored
Contrib/System/Source/System.c: In function `CallProc':
Contrib/System/Source/System.c:876: error: `_asm' undeclared (first use in this function)
Contrib/System/Source/System.c:876: error: (Each undeclared identifier is reported only once
Contrib/System/Source/System.c:876: error: for each function it appears in.)
and now lots of asm related warnings, proc undeclared, syntaxt error before push, unexpected tokens, errors before tokens, you get the idea...
scons: *** [build/release/System/Source/System.o] Error 1
scons: building terminated because of errors.
Now I'm pretty much stuck. Can anyone shed some light on how I can correctly perform the cross-compile? Do I have a screwed up or partial cross-compile environment (we use it for a seperate C project cross-compile no problems)?
Any help, greatly, greatly appreciated!