File: COMPILE

package info (click to toggle)
wxhexeditor 0.23%2Brepack-2
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 4,424 kB
  • ctags: 1,722
  • sloc: cpp: 12,487; ansic: 6,222; makefile: 188; python: 35; sh: 7
file content (78 lines) | stat: -rw-r--r-- 3,163 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
You can compile wxHexEditor with Code::Blocks (C::B) easily.
All you need to install C::B for your OS, required compilation toolset (gcc) and wxHexEditor library for compilation.

But you can also build wxHexEditor from your shell.
For compiling wxHexEditor, without C::B you have to build internal udis and mhash libraries. They are automatically compiled when you run make command.

Please follow those directives under your OS to compile wxHexEditor.
-----------------------------------------------------
LINUX
-----------------------------------------------------
For Linux, make sure you have installed wxWidgets.
Use this command for ubuntu like distros:

apt-get install libwxgtk<version>-dev

or use your need to use this one for distros like OpenSuSE...

zypper in wxWidgets-devel

Then extract the wxHexEditor:

tar xvf wxHexEditor-v<version>-src.tar.bz2
cd wxHexEditor
make OPTFLAGS="-fopenmp"

-----------------------------------------------------
WINDOWS
-----------------------------------------------------
For generating Windows executables, I use Linux to cross-compile a Windows executable via MinGW.
If you have cygwin, than good luck to build this with make command. But you are better to use C::B.

On Linux Cross-Compiling To WINDOWS
-----------------------------------------------------
If you have Linux installation and want to build Win32/Win64 build of wxHexEditor, follow this guide.
This is how I compile.
First, I compile the wxWidgets library with a cross compiler:

tar xvf wxWidgets-<version>.tar.bz2
cd wxWidgets
mkdir release
cd release
../configure --enable-{monolithic,static,unicode} --disable-{debug,shared} --host=i686-w64-mingw32
make

Then I extract the wxHexEditor:

tar xvf wxHexEditor-v<version>-src.tar.bz2
cd wxHexEditor
make win WXCONFIG=<wx-congif path> HOST=i686-w64-mingw32

PS: If you face with " _rpl_malloc " error, you can use 

ac_cv_func_malloc_0_nonnull=yes make win WXCONFIG=<wx-congif path> HOST=i686-w64-mingw32

-----------------------------------------------------
OS X
-----------------------------------------------------
Note: Due wxWidgets issues, OSX version of wxHexEditor is experimental.
Please use wxWidgets 2.8.12 version or wxWidgets 3.0 with carbon.
wxWidgets 3.0 cocoa version has full of bugs results not quite usable wxHexEditor, yet.
Also you need to have gcc tools and xcode_4.3.3_for_lion.dmg disk image mounted/installed on your Mac.

For OS X, you need to compile wxWidgets with:

tar xvf wxWidgets-<version>.tar.bz2
cd wxWidgets
mkdir release
cd release
export arch_flags="-arch i386"
../configure CFLAGS="$arch_flags" CXXFLAGS="$arch_flags" CPPFLAGS="$arch_flags" LDFLAGS="$arch_flags" OBJCFLAGS="$arch_flags" OBJCXXFLAGS="$arch_flags" --with-macosx-version-min=10.6 --with-macosx-sdk=/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/ --enable-monolithic --enable-static --disable-debug --disable-shared --with-regex=builtin --with-expat=builtin --enable-unicode

Then extract the wxHexEditor as: 

tar xvf wxHexEditor-v<version>-src.tar.bz2
cd wxHexEditor
make mac WXCONFIG=<wx-config path> OPTFLAGS="-arch i386"

That's all.