Author Topic: Can't compile anything or build anything with the ide.  (Read 10506 times)

MrTAToad

  • Guest
I notice your MinGW is at the end, whilst mine isn't...  Perhaps it worth moving it ?

Offline Amon

  • Mr. Drawsprite
  • **
  • Posts: 55
  • I code, therefore I am!
    • View Profile
    • Amon.co
Hi! I put C:\MinGW at the begining of the path and all seems to work fine for now. Will post again if any other problems come up.
- http://www.amon.co | Dev Tools - BlitzMax - Shiva Unlimited - Unity Pro - Carrara 8 Pro - Hexagon 2.2.5 - Blacksmith 3D Paint - FuturePaint Pro - Bryce 7 Pro.
I'm never wrong at all; I just discover 1000 ways that don't work!

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10759
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
uhm - it workend when you put the c:\mingw at the _front_ of the path? :blink:

Offline okee

  • Dr. Type
  • ****
  • Posts: 324
    • View Profile
I managed to get mine working using an older version of MinGW
version 5.1.3 from here http://www.blide.org/backup/MinGW.rar
Changing the path made no difference
Android: Samsung Galaxy S2 -  ZTE Blade (Orange San Francisco) - Ainol Novo 7 Aurora 2
IOS: 2 x Ipod Touch (1G)

Offline Amon

  • Mr. Drawsprite
  • **
  • Posts: 55
  • I code, therefore I am!
    • View Profile
    • Amon.co
Ahh, I went back to the same version as okee. Didn't realise it was that because after installing I moved whereit was stored in the path and when it worked I just assumed it was because I moved it.

Kind of a silly presumption but in my defence it was very late and GLBasic kept me awake....It's that good. :D :p
- http://www.amon.co | Dev Tools - BlitzMax - Shiva Unlimited - Unity Pro - Carrara 8 Pro - Hexagon 2.2.5 - Blacksmith 3D Paint - FuturePaint Pro - Bryce 7 Pro.
I'm never wrong at all; I just discover 1000 ways that don't work!

Offline dawlane

  • Mc. Print
  • *
  • Posts: 5
    • View Profile
As this is my first post here on this forum I will start by saying Greetings to all.
As I also use Blitzmax as well as GLBasic and I also had this problem with trying to compile GLbasic applications with MinGW installed with the environment variable set in the default global location (System Properties->Advanced->Environment Variables). My solution was fairly simple: I removed all references to MINGW from the System Environment Variables and then wrote a small batch file that set up the necessary MINGW paths, added these to the PATH variable and then executed the Blitzmax IDE. Doing it this way means it can do two things..

1) Stops any application that has it's own variation of MINGW/GCC (e.g GLBasic) from using any other version of MINGW and its libraries.
2) Allows you to have multiple version of mingw installed.

At the moment I using version 4.5.0 but I also have 3.4.5 as well just in case something doesn't work.

To create a batch file use notepad and copy and paste the file below not forgetting to change a few thing to suit your environment. Then save the file and rename the file extension from a .txt to a .bat. Note to see the file extensions you will have to uncheck "Hide extensions for known file types" that can be found in windows explorer's Folder Options View tab (usually found from the menu bar under Tools->Folder Options on XP or Organize->Folder and Search Options on Vista/Win7).

Code: (glbasic) [Select]
@echo off

rem set the Version of mingw
set MINGW_VER=4.5.0

rem set the default path of mingw
set MINGW=path to MINGW

rem You mostly only need maybe four of the below variables GCC_EXEC_PREFIX (Vista/Win7), MINGW_BIN
rem MINGW_INC and MINGW_LIB. But if you have problems add the others as well.

set GCC_EXEC_PREFIX = %MINGW%\lib\gcc\
set MINGW_BIN=%MINGW%\bin
set MINGW_EXEC=%MINGW%\libexec\gcc\mingw32\%MINGW_VER%
set MINGW_GCC=%MINGW%\lib\gcc\mingw32\%MINGW_VER%
set MINGW_GCC_INC=%MINGW%\lib\gcc\mingw32\%MINGW_VER%\include
set MINGW_INC=%MINGW%\include
set MINGW_LIB=%MINGW%\lib
set MINGW_PATH=%MINGW%;%MINGW_BIN%;%MINGW_INC%;%MINGW_LIB%;%MINGW_EXEC%;%MINGW_GCC%;%MINGW_GCC_INC%;%GCC_EXEC_PREFIX%

rem add the MINGW FILE PATHS to the SYSTEM PATH
set path=%PATH%;%MINGW_PATH%

rem execute the Blitzmax IDE
start /D"Path to BlitzMax" MaxIDE.exe
« Last Edit: 2010-Nov-14 by dawlane »

MrTAToad

  • Guest
As I mentioned previously, it might be worth changing the order of \MinGW in the %PATH% variable - if it works, should save a lot of trouble :)

Offline okee

  • Dr. Type
  • ****
  • Posts: 324
    • View Profile
Quote
As I mentioned previously, it might be worth changing the order of \MinGW in the %PATH% variable - if it works, should save a lot of trouble

I don't think that makes a difference, didn't work for me or Amon, what version of MinGW have you installed ?
The conflict seems to be with newer versions of MinGW
Android: Samsung Galaxy S2 -  ZTE Blade (Orange San Francisco) - Ainol Novo 7 Aurora 2
IOS: 2 x Ipod Touch (1G)

MrTAToad

  • Guest
I'm using the 30/10/2010 version (with updated repositories), and installed C, C++ - all is fine here...

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10759
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
oh - please try to run glbasic editor with that script:

Code: (glbasic) [Select]
SET MINGW_LIB=
SET MINGW_INC=
SET MINGW_EXEC=
SET MINGW_GCC=
SET_MINGW_GCC_INC=
SET MINGW_PATH=
C:\Program Files\GLBasic\Editor_e.exe

It might work then. I hope you can somehow tell the glbasic compiler _not_ to use _any_ mingw path other that what the command line has.

Offline dawlane

  • Mc. Print
  • *
  • Posts: 5
    • View Profile
Using a script to start the GLBasic Editor will not work as that was the first thing I tried. From what I can gather it uses a .ini file located in "GLBasic\Compilers\platform" that's used to invoke the selected platform's version of the compiler. As this file is a plain text file it can be edited to be redirected to execute a batch file that can then be use to set up any necessary paths and then execute the compiler.  Of course you will have to do this for every version of the supported compiler that is having problems.

I've already test this out with MINGW's environment variables set within the default system path and every thing seems ok for the Windows build, but a few of the other supported platforms have problems when you try to compile.
If you want to test it out create a batch file in "GLBasic\Compilers\platform\Win32\bin" and copy and paste the code below and then modify every g++.exe in the [win32] section of platforms.ini to g++.bat

Code: (glbasic) [Select]
rem Force GLBasic to Use only GLBasic's Win32 g++ compiler

rem replace PATH TO GLBASIC with your GLBasics path
set GLBASIC=PATH TO GLBASIC
set PLATFORM=%GLBASIC%Compiler\platform\
set Bin=%PLATFORM%Win32\Bin
set lib=%PLATFORM%Win32\lib

rem Make sure to remove GCC_EXEC_PREFIX if it is set within
rem the system environment variables it will break the linker ld
set GCC_EXEC_PREFIX=

set PATH=%bin%;%lib%

rem execute the g++ compiler with verbose output
rem and pass the rest of the command line from platform.ini 
g++.exe -v %*

The down side to doing it this way is you would have to do it every time there was an update. And the only permanent solution would be  down to GLBasics author to solve.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10759
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
fixed in next update.

Offline dawlane

  • Mc. Print
  • *
  • Posts: 5
    • View Profile
I hate to say this Kitty but just updated to 8.174 and it doesn't quite play nicely if you have MinGW set up on a Vista/Windows7 (and possibly XP)  machine and you want to build any OSX, iPhone or DLL projects. After playing around you can still build Win32-DLL's if the MinGW version is 3.4.5 as it still searches the PATH Environment variable any other version of MinGW and building DLL's will fail. Other wise every thing else seems to compile ok on my machines.

If any one is still having problems the work around is still to modify your platform.ini to point to a custom batch file like the one below:
Code: (glbasic) [Select]
rem Force GLBasic to use iPhone Compiler

rem SAVE THIS BATCH FILE TO YOUR "platform\iphone\" ROOT FOLDER AS arm-apple-darwin9-g++.bat

rem Get the absolute path of this batch file
set GLBASIC=%~dp0

rem Set up the paths
set BIN=%GLBASIC%bin
set LIB=%GLBASIC%lib

rem If  GCC_EXEC_PREFIX is set in the system environment variables make sure it's cleared
set GCC_EXEC_PREFIX=

rem set the PATH variable temporarily to point to GLBasic's Compilers tool and library suite
set PATH=%BIN%;%LIB%

rem execute the iphone compiler with verbose output (-v)
arm-apple-darwin9-g++.exe -v %*