Author Topic: Unable to compile wxWidgets (ld.exe has stopped working)  (Read 13683 times)

Offline ngr.hd

  • Multiple posting newcomer
  • *
  • Posts: 10
Unable to compile wxWidgets (ld.exe has stopped working)
« on: November 01, 2011, 03:41:44 pm »
Today I was trying to compile wxWidgets (v2.8.12) using TDM-GCC 4.6.1 (x32) on Windows 7 (x64) but it gave me an error message saying that ld.exe has stopped working. I have also noticed that it was taking around 1-2 minutes to compile each and every element of wWidgets although I have DDR-2 4GB RAM. I also tried downloading wxWidgets again from their website to check if something went wrong during the extraction process of my earlier kept wxWidgets.zip. With no success  :cry: I tried reinstalling TDM-GCC but the problem was same, viz. ld.exe has stopped working.

zabzonk

  • Guest
Re: Unable to compile wxWidgets (ld.exe has stopped working)
« Reply #1 on: November 01, 2011, 03:47:48 pm »
What was the exact error message? Please copy and paste it.

Also, I have never managed to build wxwidgets 2.8 on Windows, despite numerous attempts. Unless you specifically need to build the thing yourself, I recommend getting it pre-built from wxPack at http://wxpack.sourceforge.net

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Unable to compile wxWidgets (ld.exe has stopped working)
« Reply #2 on: November 01, 2011, 05:14:14 pm »
Your post is not related to C::B in any way.

This forum is neither a  wxWidgets nor a gcc (not even TDM's great version of MinGW) support site.

With registering here, you have accepted to respect the rules of our forum.
Please do it and ask such questions in a forum/website, that is related to your compiler and/or the library you try to build.

Offline ngr.hd

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Unable to compile wxWidgets (ld.exe has stopped working)
« Reply #3 on: November 01, 2011, 05:23:56 pm »
Sorry, if I have not respected the rules.
@jens: I just wanted to ask you, have you ever compiled Codeblocks after compiling wxWidgets with the new TDM-GCC, for your nightlies?
@Niel : It's just a normal crashing console in Windows 7. No logs are created.
« Last Edit: November 01, 2011, 05:26:10 pm by ngr.hd »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Unable to compile wxWidgets (ld.exe has stopped working)
« Reply #4 on: November 01, 2011, 06:31:16 pm »
@jens: I just wanted to ask you, have you ever compiled Codeblocks after compiling wxWidgets with the new TDM-GCC, for your nightlies?
I build the nightlies for debian/ubuntu.
To be honest, I don't even know, which version of MinGW I ahave used for the last build of wxWidgets on windows (either 4.4.x or 4.5.x).
The official nightlies build by killerbot are build with gcc 4.5.2, if I see it correctly.

zabzonk

  • Guest
Re: Unable to compile wxWidgets (ld.exe has stopped working)
« Reply #5 on: November 01, 2011, 07:00:47 pm »
> I just wanted to ask you, have you ever compiled Codeblocks after compiling wxWidgets with the new TDM-GCC

This weekend, on Windows 7, I compiled the trunk revision of CB, using the latest TDM-GCC, and linked it with the build of wxWidgets provided by wxPack - and everything seems to be working just fine.

Offline ngr.hd

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Unable to compile wxWidgets (ld.exe has stopped working)
« Reply #6 on: November 01, 2011, 07:49:38 pm »
> I just wanted to ask you, have you ever compiled Codeblocks after compiling wxWidgets with the new TDM-GCC

This weekend, on Windows 7, I compiled the trunk revision of CB, using the latest TDM-GCC, and linked it with the build of wxWidgets provided by wxPack - and everything seems to be working just fine.


Actually the compiling process of wxWidgets crashes in between; obviously I cannont compile Codeblocks using half compiled wxWidgets.
By saying "latest TDM-GCC", do you mean 4.6.1?

Offline ngr.hd

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Unable to compile wxWidgets (ld.exe has stopped working)
« Reply #7 on: November 01, 2011, 08:09:05 pm »
The official nightlies build by killerbot are build with gcc 4.5.2, if I see it correctly.

@jens : Yes, you're right. Killerbot had compiled wxWidgets using GCC 4.5.2 before compiling Codeblocks. He has not yet compiled wxWidgets using the new GCC 4.6.1 which causes crash. And it's not me, many of my friends have reported a fatal crash during the compilation of wxWidgets using GCC 4.6.1. I wanted to know will you update your pages, http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows and http://forums.codeblocks.org/index.php?topic=3299.0 portraying this issue?

I have also reported this issue on wxWidgets Forums.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Unable to compile wxWidgets (ld.exe has stopped working)
« Reply #8 on: November 01, 2011, 10:40:17 pm »
I have compiled wxWidgets (2.8.12) and Code::Blocks (trunk) with TDM-GCC 4.6.1 on Windows XP and Vista (both 32 bit).  The compilation succeeded for me without any problems.

@Niel : It's just a normal crashing console in Windows 7. No logs are created.
To get an error log, append 2> ErrorLog.txt to your make command (> Log.txt will redirect all of the normal output to a log file); for example:
mingw32-make -f makefile.gcc 2> ErrorLog.txt

In the past, I have sometimes had linker (ld.exe) problems if I manually added optimization flags (beyond setting it to "release").

You could also try building wxWidgets from within a working Code::Blocks environment using the project file I posted earlier.

(Edit:)
Are you using the flag -fno-keep-inline-dllexport as suggested here?
« Last Edit: November 01, 2011, 11:16:59 pm by Alpha »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Unable to compile wxWidgets (ld.exe has stopped working)
« Reply #9 on: November 02, 2011, 09:33:06 am »
(Edit:)
Are you using the flag -fno-keep-inline-dllexport as suggested here?
You have to use it, otherwise it won't work.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

zabzonk

  • Guest
Re: Unable to compile wxWidgets (ld.exe has stopped working)
« Reply #10 on: November 02, 2011, 11:24:24 am »
> Actually the compiling process of wxWidgets crashes in between; obviously I cannont compile Codeblocks using half compiled wxWidgets.

If you use wxPack, as I suggested, you don't have to build wxWidgets at all - wxPack is a pre-compiled version of wxwidgets!

> By saying "latest TDM-GCC", do you mean 4.6.1?

Yes.