Author Topic: Error Compiling Code::Blocks SVN under Windows  (Read 16591 times)

Offline MP2E

  • Multiple posting newcomer
  • *
  • Posts: 10
Error Compiling Code::Blocks SVN under Windows
« on: January 06, 2008, 11:41:54 pm »
I have followed everything in the wiki and I have the latest version of wxMSW Installed however Code::Blocks fails to compile at wxScintilla. Here is the error:
Quote
-------------- Build: scintilla in Code::Blocks ---------------

Linking dynamic library: devel\wxscintilla.dll
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw28u
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
1 errors, 0 warnings


I'm assuming that this is something to do with wxMSW 2.8.7. I have compiled as said and entered it in to the Global Variables.
« Last Edit: January 06, 2008, 11:45:41 pm by MP2E »

Offline ivan_ijh

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error Compiling Code::Blocks SVN under Windows
« Reply #1 on: January 07, 2008, 04:35:15 am »
I have followed everything in the wiki and I have the latest version of wxMSW Installed however Code::Blocks fails to compile at wxScintilla. Here is the error:
Quote
-------------- Build: scintilla in Code::Blocks ---------------

Linking dynamic library: devel\wxscintilla.dll
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw28u
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
1 errors, 0 warnings


I'm assuming that this is something to do with wxMSW 2.8.7. I have compiled as said and entered it in to the Global Variables.


Well, i've just correct this on my C::B project. The reason is that linker cannot find library "wxmsw29u" ( or "libwxbase28.a" ). And my problem was in global variable "wx" (You can find it in   [Main Menu] /Settings/Global Variables. Lib directory must be exactly "wxdirectory/lib" (for example  mine is "D:\cvs_projects\codeblocks\wxWidgets2.8\lib". DO NOT USE  "wxdirectory/lib/gcc_lib", because in build options (linker search path) of the project this directory is extended with option "$(#WX.lib)\gcc_lib$(WX_CFG)"

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Error Compiling Code::Blocks SVN under Windows
« Reply #2 on: January 07, 2008, 04:48:32 am »
I'm assuming that this is something to do with wxMSW 2.8.7. I have compiled as said and entered it in to the Global Variables.

What is the value you entered in for wx as the Global Variable.

Mine is F:\SourceCode\Libraries\wxWidgets\wxMSW-2.8.7
This folder contains an sub-directory called lib and under that is a folder called gcc_dll.
Inside the folder gcc_dll is a file named libwxmsw28u.a and an DLL to go with it.

Do you see the file named libwxmsw28u.a?

Note, please use the correct forum for future questions, These forums are for people developing Code::Blocks NOT people using Code::Blocks to develop other software.
For Code::Blocks installing issues I suggest the normal "Help" forum
http://forums.codeblocks.org/index.php/board,1.0.html


Tim S
« Last Edit: January 07, 2008, 04:55:38 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ivan_ijh

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error Compiling Code::Blocks SVN under Windows
« Reply #3 on: January 07, 2008, 05:17:36 am »
Note, please use the correct forum for future questions, These forums are for people developing Code::Blocks NOT people using Code::Blocks to develop other software.
For Code::Blocks installing issues I suggest the normal "Help" forum
http://forums.codeblocks.org/index.php/board,1.0.html
Tim S

Excuse me if I'm wrong (I'm also new here), but as I see the problem is about building C::B using C::B for this (see "[cvsdirectory]\trunk\src\CodeBlocks.cbp"). I have a similar question posted here, but with linker problem.  :oops:

Offline MP2E

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Error Compiling Code::Blocks SVN under Windows
« Reply #4 on: January 07, 2008, 05:18:29 am »
My Base path is: C:\wxMSW-2.8.7
Lib path is: C:\wxMSW-2.8.7\lib
Include path is: C:\wxMSW-2.8.7\include
And yes, libwxmsw28u.a exists.

I don't know what else could be wrong >_<
« Last Edit: January 07, 2008, 05:30:00 am by MP2E »

Offline ivan_ijh

  • Single posting newcomer
  • *
  • Posts: 7
Re: Error Compiling Code::Blocks SVN under Windows
« Reply #5 on: January 07, 2008, 05:31:24 am »
My Base path is: C:\wxMSW-2.8.7
Lib path is: C:\wxMSW-2.8.7\lib
Include path is: C:\wxMSW-2.8.7\include
And yes, libwxmsw28u.a exists.

Try to use whole path to libwxmsw28u.a in Project Bulid Options\Linker Settings tab\Link libraries list as :
C:\wxMSW-2.8.7\lib\gcc_lib\libwxmsw28u.a
instead of "wxmsw28$(WX_SUFFIX)"

And if its all ok then the problem is with "wx" global variable. But if you have the same problem again i cannot help. Good night now !

Offline MP2E

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Error Compiling Code::Blocks SVN under Windows
« Reply #6 on: January 07, 2008, 05:40:39 am »
Wait a minute, actually that file doesn't exist! What can I do to get it?(sorry about misinforming you earlier, coulda sworn i saw it)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Error Compiling Code::Blocks SVN under Windows
« Reply #7 on: January 07, 2008, 08:00:04 am »
Wait a minute, actually that file doesn't exist! What can I do to get it?(sorry about misinforming you earlier, coulda sworn i saw it)

You need to compile wxWidgets to create the file named libwxmsw28u.a

See WiKi http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)


Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Error Compiling Code::Blocks SVN under Windows
« Reply #8 on: January 07, 2008, 08:06:02 am »
Wait a minute, actually that file doesn't exist! What can I do to get it?(sorry about misinforming you earlier, coulda sworn i saw it)

You need to compile wxWidgets to create the file named libwxmsw28u.a

See WiKi http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW)


Tim S
The last ")" is missing from link.
Correct link is : http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_(MSW).

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Error Compiling Code::Blocks SVN under Windows
« Reply #9 on: January 07, 2008, 06:41:54 pm »
Jens:

Thank you, for the correction of the link.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org