GLBasic forum

Main forum => GLBasic - en => Topic started by: AndyH on 2008-Jan-02

Title: Linking error (demo)
Post by: AndyH on 2008-Jan-02
Hi - I get the following error when I try to run any code... this is from the hello world example:

Code (glbasic) Select
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.2007.348 - 2D, WIN32
Wordcount:3 commands

compiling:

linking:
/mingw/lib/crt2.o:crt1.c:(.text+0x167): undefined reference to `__cpu_features_init'
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Time: 4.9 sec
Build: 0 succeeded
*** 1 FAILED ***
Any suggestions?
Title: Linking error (demo)
Post by: Ian Price on 2008-Jan-02
Reinstall? Web-update? Silly suggestions, and I'm sure you've considered both.

The "Hello World" program definitely works.
Title: Linking error (demo)
Post by: AndyH on 2008-Jan-02
I'm sure they work :)  Something not right here - have installed the latest version and done the web update.  That part seems to have worked ok.

The only things perhaps non-standard to note is that when I first ran it, it asked for my home project location and copied files over - this was on an external drive.  I did not try running any code.  I later booted without this external drive and it asked about the home project location and I had to select one on my local hard disk.  It was at this point I tried to run a some code.

The other thing is I have MinGW but long shot, probably not anything to do with this problem.

I'll try another re-install.  Any other suggestions welcome, but sounds like this problem has not come up for anyone before.
Title: Linking error (demo)
Post by: Ian Price on 2008-Jan-02
I don't have MingW at all on my system, so I suspect that's not the problem. I believe you've already identified the problem - the home project folder being on your external HD, maybe the required .DLLs and whatever else are stored in that folder too, meaning that they are effectively missing? Dunno.

Reinstall it on your basic set-up and see if it works this time?
Title: Linking error (demo)
Post by: matty47 on 2008-Jan-02
Hi,
I ran into troubles having MingW installed on my system. GLBasic picks up the wrong compiler/libs and fails to compile properly. I overcame this by removing the environmental variable (c:\MingW\bin in the PATH variable) and renaming the MingW directory (in case there are some entries in the registry) GLBasic then behaved normally. When I want to use MingW I do the reverse.(rename the directory and add the MingW dir to the PATH variable). Bit kludgy but it works
Matthew
Title: Linking error (demo)
Post by: Kitty Hello on 2008-Jan-02
...or Start GLBAsic with a .bat file, where you set PATH to something excluding the mingw directory.
Very strange, though.
Title: Linking error (demo)
Post by: AndyH on 2008-Jan-02
Renaming the folder fixed the problem.  Can compile now :)
Title: Linking error (demo)
Post by: Kitty Hello on 2008-Jan-03
Which folder? Can you help him?:
http://www.glbasic.com/forum/viewtopic.php?pid=8859#p8859
Title: Linking error (demo)
Post by: AndyH on 2008-Jan-03
Ah yes, the MinGW folder.  I've just renamed it while I'm playing with GLBasic.  I rarely use MinGW, but it would be great if there was an easier way to allow GLBasic to co-exist with it.
Title: Linking error (demo)
Post by: Kitty Hello on 2008-Jan-03
Please post your environment variables here
(from a command line:
SET > c:\out.txt && notepad.exe c:\out.txt
)
Title: Linking error (demo)
Post by: AndyH on 2008-Jan-03
Bits of relevance:

MinGW=c:\MinGW
Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\MinGW\bin;C:\Program Files\QuickTime\QTSystem\
Title: Linking error (demo)
Post by: Kitty Hello on 2008-Jan-03
Ah. OK. I'll fix that in an update then.
Title: Linking error (demo)
Post by: AndyH on 2008-Jan-03
Excellent
Title: Linking error (demo)
Post by: AndyH on 2008-Jan-07
I see the MinGW fix is in tonight's update but unfortunately I still get this error if my MinGW folder exists:

   // Editor:
   // MINGW environmental variable suppressed. GLBasic
   // should run beside a MinGW installation now.