Author Topic: help me please! I compile the codeblock but failed!  (Read 13905 times)

boyeestudio

  • Guest
help me please! I compile the codeblock but failed!
« on: December 14, 2005, 08:05:40 am »
 :? :? :? :? :? :? :? :? :? :? :?
Switching to target: scintilla
Linking dynamic library: devel\wxscintilla.dll
C:\Program Files\CodeBlocks\bin\..\libexec\gcc\mingw32\3.4.4\ld.exe: cannot find -lwxmsw26
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 21 seconds)
1 errors, 0 warnings
 :? :? :? :? :? :? :? :? :? :? :?

I have compile the wxWidgets but I can't find the file wxmsw26 in the lib directory.
And I use the wxWidgets 2.6.2 on the Windows.
Please give me some help!Thanks a lot!
 

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: help me please! I compile the codeblock but failed!
« Reply #1 on: December 14, 2005, 08:21:41 am »
there is a bug in the project file CodeBlocks-NewBuild.cbp
if you are using a standard wx-wigdets installation
(standard == built without using the CFG=NonUnicode makefile build parameter)

first look, where youre libwxmsw26.a is on your harddisk,
if you have done a standard wx-widgets installation, it should be located in
<wx262>\lib\gcc_dll\libwxmsw26.a

if so, do the following:
go to Project->Build options->"Directories"->"Linker"
edit the line
$(#WX.lib)\gcc_dll\msw
to
$(#WX.lib)\gcc_dll
or delete it completely, in this case you have to you go to the Tab "Custom variables"
and edit the variable WX_CFG to what you used during your wx-widgets build, standard is a empty string.

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: help me please! I compile the codeblock but failed!
« Reply #2 on: December 14, 2005, 08:29:50 am »
Edit: This post had bad ideas  :o

See here for better:

http://forums.codeblocks.org/index.php?topic=1633.msg11822#msg11822
« Last Edit: December 14, 2005, 09:22:15 am by 280Z28 »
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool:

boyeestudio

  • Guest
Re: help me please! I compile the codeblock but failed!
« Reply #3 on: December 14, 2005, 08:36:59 am »
there is a bug in the project file CodeBlocks-NewBuild.cbp
if so, do the following:
go to Project->Build options->"Directories"->"Linker"
edit the line
$(#WX.lib)\gcc_dll\msw
to
$(#WX.lib)\gcc_dll
or delete it completely, in this case you have to you go to the Tab "Custom variables"
and edit the variable WX_CFG to what you used during your wx-widgets build, standard is a empty string.


the wxWidgets I compiled with VC++ 6.0. I can't find the directory $(WX.lib)\gcc_dll but find $(WX.lib)\mswd subdirectory.
and it is nothing but a file .\wx\setup.h in it.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: help me please! I compile the codeblock but failed!
« Reply #4 on: December 14, 2005, 08:40:20 am »
you have to build wx-widgets with mingw gcc in order to build CodeBlocks - read the wiki and get familiar with the search button.

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: help me please! I compile the codeblock but failed!
« Reply #5 on: December 14, 2005, 09:00:04 am »
there is a bug in the project file CodeBlocks-NewBuild.cbp
if so, do the following:
go to Project->Build options->"Directories"->"Linker"
edit the line
$(#WX.lib)\gcc_dll\msw
to
$(#WX.lib)\gcc_dll
or delete it completely, in this case you have to you go to the Tab "Custom variables"
and edit the variable WX_CFG to what you used during your wx-widgets build, standard is a empty string.


the wxWidgets I compiled with VC++ 6.0. I can't find the directory $(WX.lib)\gcc_dll but find $(WX.lib)\mswd subdirectory.
and it is nothing but a file .\wx\setup.h in it.

I'll make it easy for you:

1. Download MinGW-3.1.0-1 and install it to C:\MinGW (I'll use this path for reference later)
2. Download gcc-core-3.4.4-20050522-1.tar.gz and gcc-g++-3.4.4-20050522-1.tar.gz and extract them to C:\MinGW
3. Download binutils-2.16.91-20050827-1.tar.gz and extract it to C:\MinGW
4. Download infozip. Extract it and add the .exe files to C:\MinGW\bin
5. Add C:\MinGW\bin and C:\MinGW\mingw32\bin to your PATH. You might have to reboot for changes to take effect here.
6. Download wxMSW-2.6.2.zip and extract it to C:\Devel\

You should now have a folder C:\Devel\wxWidgets-2.6.2 with subfolders build and lib (and a lot of others).

7. Create a batch file called build.bat in C:\Devel\wxWidgets-2.6.2\build\msw

Code
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 CFG=NonUnicode clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 CFG=NonUnicode

8. Run that batch file and wait for the build to finish. It could take a while.
10. Download a recent copy of Code::Blocks from here so you can open the new build project files.

You can then open CodeBlocks-NewBuild.cbp and immediately build. :)

After building codeblocks, you will have a directory codeblocks\src\devel. Copy C:\Devel\wxWidgets-2.6.2\lib\gcc_dllNonUnicode\wxmsw26_gcc_custom.dll to that (the devel) directory.
Run codeblocks\src\update.bat

Your output files will be placed in codeblocks\src\output
« Last Edit: December 14, 2005, 09:15:32 am by 280Z28 »
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool:

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: help me please! I compile the codeblock but failed!
« Reply #6 on: December 14, 2005, 09:10:09 am »

instead of
...
Code
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
...

PLEASE USE the following !!!
Code
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 CFG=NonUnicode clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 CFG=NonUnicode

btw - are you using an encrypted username ?

Now I see what the real problem is. The Wiki has the wrong build instructions (that's where I made my bat file from). Your change should fix it, I wish I had known about that option earlier. :)

What do you mean by an encrypted username?
« Last Edit: December 14, 2005, 09:21:11 am by 280Z28 »
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool:

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: help me please! I compile the codeblock but failed!
« Reply #7 on: December 14, 2005, 09:14:33 am »
What do you mean by an encrypted username?

is there a special meaning behind 280Z28 ?
it is not easy to remember - at least not for me  8)


Edit: I moved this reply to "my" thread:

http://forums.codeblocks.org/index.php?topic=1630.msg11830#msg11830
« Last Edit: December 14, 2005, 09:20:26 am by 280Z28 »
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool: