On 23.04.2012 23:52, Matthias Melcher wrote:
>
> To those MinGW fans out there: I am trying to add MinGW compiles for Jenkins.

Great!

> I downloaded MinGW-get from mingw.org and ran it (it seems that they uploaded 
> it only 24 hours ago - should I use a different version).

It's probably mingw-get-inst (not mingw-get), the former is the GUI
installer, the latter the command line version.

> Using the included package, it does not install the C compiler (it does 
> compile C++ though). Using the option to download the newest version, I get 
> tons of download errors from sourceforge.

I assume you mean the "catalogues"? Using the "pre-packaged repository
catalogues" should be okay, I just did it successfully. Downloading
"latest" catalogues would only be useful, if you used this version
later (same (then old) installer, with newer and updated software).
I didn't try this option, but I don't think that it's related to the
download errors.

Unfortunately sourceforge is known to have (sometimes) a bad download
performance, and maybe fail to download some files. You should try
again later (I assume that mingw-get[-inst] wouldn't download existing
packages again, if you use the same installation path). Remember not
to use a path with spaces!

> What am I doing wrong?

Probably nothing, maybe it was only a bad time. Try again. You should
select the following components to get a working MinGW installation:

Select:
  MinGW Compiler Suite
    C Compiler
    C++ Compiler
  MinGW Developer Toolkit (Includes MSYS Basic System)

Unfortunately there is a known bug in the latest installer (that's why
gcc is not installed correctly :-( ), but you can fix it easily. After
the installation is done, start MinGW from the start menu, and do this:

mingw-get update
mingw-get install gcc
mingw-get install libgmp

If everything went okay, gcc and g++ ought to work.

To compile FLTK with this MinGW version successfully (i.e. to be able
to run fluid w/o manipulating DLL's or the PATH), you should configure
and/or make like this

LDFLAGS="-static-libgcc -static-libstdc++" make

As you know, this is only needed for the actual configure run, and
after this you don't need to specify LDFLAGS any more, you can just
run make.

> Oh, and a second thing: I am also trying to find a way to run MinGW scripts 
> from the MSWindows shell (which is what Jenkins does).

Hmm, the default way to use MinGW is to use it from the Windows
shell (command, or cmd?), although this is less comfortable for
interactive use. You can start an (interactive/login) bash shell
however, if you run it from a .bat file. For a first test you
can take a look at <path-to-mingw>/msys/1.0/msys.bat near the
end of the file, where it starts sh like this (replace sh with
bash, if you like):

start sh --login -i

Maybe this could be combined with something to set the correct PATH
and run a (bash) shell script?

start bash --login -i -c compile-fltk.sh

or similar. Please ask again, if the installation is done correctly
and you still have problems, I can try to help then.

One more note: although some people recommend changing the Windows
system PATH environment variable, I never do this for MinGW. IMHO
it is much better to change the path only in the MinGW environment.
I also *remove* some Windows path components which I don't like in
the MinGW environment, e.g. 
"/c/Windows/System32/WindowsPowerShell/v1.0/" (why would I want this in 
a MinGW environment?). So, what
I do in .bashrc is something like this:

export MINGW_PATH="/usr/local/bin:/mingw/bin:/bin:"
export SYSTEM_PATH="/c/Windows/system32:/c/Windows"
#
mingw_path() { mingw_prompt; \
export PATH="${MINGW_PATH}${SYSTEM_PATH}"; echo PATH=$PATH; }
#
# Set Default Path
#
mingw_path

I'm using this to switch the PATH interactively when needed...
You must make sure that ~/.bashrc will be sourced when you login,
YMMV.

Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to