Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Crepuscule on November 30, 2011, 11:09:10 am

Title: Problème to compile Code::Blocks...
Post by: Crepuscule on November 30, 2011, 11:09:10 am
Hello!

I have some troubles to compile correctly Code::Blocks with Windows XP.
This is what I've done:

I read the manual here:
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows)

I use the Gcc compiler given with Code::Blocks 10.05 (When I start Code::Blocks, it is displayed: "Release 10.05 rev 6283 (2010-05-27 09:09:13) gcc 4.4.1 Windows/unicode - 32bit").
I downloaded WxWidgets 2.8.12. I downloaded it on : http://www.wxwidgets.org/downloads/ (http://www.wxwidgets.org/downloads/) section "wxMSW - installer for Windows, with manual (other formats: zip)" (I downloaded the installer and not the zip file).

I defined the compiler in the path of WindowsXP: "c:\Programmes\CodeBlocks\mingw\bin;c:\Programmes\CodeBlocks\mingw\mingw32\bin"
I restarted my compture to update the path.

I installed WxWigdets in "C:\wxWidgets-2.8.12" and compile it with:

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

Next, I downloaded the last version of CodeBlocks on SVN (rev 7620 on http://svn.berlios.de/svnroot/repos/codeblocks/trunk).

I launched the codeBlock project : CodeBlocks.cbp
I defined the global variables for wxWidgets.

Next I buiilt all. The compilation ran into the end. Next, I entered in the directory "src/devel/" and launched the file "codeblocks.exe".
The CodeBlocks application is starting with "SVN 0" written.
A pop-up appears at the bottom right of the screen with a warning message :

"WARNING
One or more pluginswere not loaded.
This usually happens when a plugin is built for a different version of the Code::Blocks SDK.
Check the application log for more info.

List of failed plugins:

astyle.dll
autosave.dll
... (others .dll)
compiler.dll
... (others .dll)
"

I tryed also to make a release version using the "update.bat" file. I generated an "output" directory. I try to start the application with these files but it is the same problem.

With this warning I can use Code:Blocks, but I can't compile, open project... etc...
When I try to open a project I have the following message:

"Deactivating the compiler plugin is most unwise.
If you intend to open a project, you have to re-activate the compiler plugin first."

So, I tryed to add plugins. I exported all the plugins of my official CodeBlocks 10.05 in .cbplugin format in a directory and tryed to import them in my customized codeBlocks, using section "Plugins/Manage plugins...". I clicked on "Install new", selected the .cbplugin files.
A warning message appears:
"One or more plugins were not installed successfully:
astyle-1.2.cbplugin
...
"


Is anybody have an idea about my problem?

Regards,

Crepuscule
Title: Re: Problème to compile Code::Blocks...
Post by: Jenna on November 30, 2011, 12:39:37 pm
Before you start the newly build, you have to run "src/update.bat", to copy the resources.
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on November 30, 2011, 04:13:47 pm
Hello!

As I said in my first message, I already start the update.bat script file.
After reading your message, I started the update.bat and next built the project. I launched the software --> same problem like before!
I don't understand...

Crepuscule
Title: Re: Problème to compile Code::Blocks...
Post by: Alpha on November 30, 2011, 04:37:27 pm
When you run update.bat, is zip.exe (http://ftp//ftp.info-zip.org/pub/infozip/win32/zip232xn.zip) on the path?
Title: Re: Problème to compile Code::Blocks...
Post by: stahta01 on November 30, 2011, 04:49:39 pm
I entered in the directory "src/devel/" and launched the file "codeblocks.exe".

You should be running codeblocks.exe from "src/output/"

Tim S.
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on November 30, 2011, 04:53:50 pm
When you run update.bat, is zip.exe (http://ftp//ftp.info-zip.org/pub/infozip/win32/zip232xn.zip) on the path?

No, I don't have zip.exe in the path of windows.
Why do we need zip?

Crepuscule
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on November 30, 2011, 04:54:48 pm
I entered in the directory "src/devel/" and launched the file "codeblocks.exe".

You should be running codeblocks.exe from "src/output/"

Tim S.

As I said in my first message, I tryed also to run code blocks from the scr/output directory after starting the update.bat script file.

Crepuscule
Title: Re: Problème to compile Code::Blocks...
Post by: stahta01 on November 30, 2011, 05:08:20 pm
When you run update.bat, is zip.exe (http://ftp//ftp.info-zip.org/pub/infozip/win32/zip232xn.zip) on the path?

No, I don't have zip.exe in the path of windows.
Why do we need zip?

Crepuscule

Because the batch file needs it to work.
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on November 30, 2011, 05:16:07 pm
Ok, I will try to do that.

But I can't access to the link you gave me for zip.exe. Can I take any version of winzip to do that?

Crepuscule
Title: Re: Problème to compile Code::Blocks...
Post by: Alpha on November 30, 2011, 05:23:40 pm
But I can't access to the link you gave me for zip.exe.
Oops, sorry (it is an ftp, but I accidentally embedded it as standard hyperlink).

Here is the actual link: zip.exe (ftp://ftp.info-zip.org/pub/infozip/win32/zip232xn.zip)
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on December 01, 2011, 08:28:39 am
The new link you gave doesn't run anymore...
Title: Re: Problème to compile Code::Blocks...
Post by: zabzonk on December 01, 2011, 09:49:35 am
http://gnuwin32.sourceforge.net/packages/zip.htm and did you actually read this page http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows which tells you all about the need for zip, update.bat etc?
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on December 01, 2011, 10:36:42 am
I looked again the manual : http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows (http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows)
I discovered the part about zip.exe. Because I already installed SVN on my computer, the last time I didn't read the SVN part of the manual. The information about zip.exe was in this part.

So I add zip.exe to minGW and in my PATH...
I did again all the procedure but I still have the same problem.

Anyone else has another idea?

Crepuscule
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on December 01, 2011, 10:43:44 am
In fact, I already had a zip.exe file in my MinGW/bin folder...
Title: Re: Problème to compile Code::Blocks...
Post by: Alpha on December 01, 2011, 11:36:29 pm
Sorry for the bad links. :oops: (That is where I downloaded it from, but maybe my computer is just strange...)
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on December 02, 2011, 12:21:53 am
Hello!

I am trying to compile on another computer. I did again all the procedure from the beginning to the end.
I saw I have an error during the compilation of wxWidgets.

I think the problem could be that. To compile wxWidgets, I am using the MinGW supplyed with Code::Blocks 10.05. Do you think that could be the problem?

Or, it is possible I am using bad source code of wxWidgets. I am working on windowsXP. Anybody could confirm the address of the good sources?

Thanks,


Crepuscule
Title: Re: Problème to compile Code::Blocks...
Post by: Alpha on December 02, 2011, 03:38:23 am
I downloaded the MSW source archive for 2.8.12 from http://wxwidgets.org/downloads/ (http://wxwidgets.org/downloads/) (the specific file was wxMSW-2.8.12.zip (http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.8.12.zip)).

This compiled fine for me on XP (using the TDM build of MinGW, which is what Code::Blocks ships with on Windows).

Or, it is possible I am using bad source code of wxWidgets.
Make sure you clean your make process before building.  Occasionally cleaning does not get rid of pieces of a failed build; in this case, you could try deleting the directory containing wxWidgets, then extract a fresh copy.
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on December 02, 2011, 07:41:25 am
OK,

So, I am using the good one.

I don't understand what happens... yesterday night, I did the same procedure than before but on another computer... Code::Blocks compiles corrctly and start the application without error. I will begin again to start fron 0 on my first computer... I don't understand what is different!

The only difference is: yesterday I did the procedure in a virtual machine. That should not interact on the compilation...

Crepuscule
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on December 02, 2011, 10:05:12 am
Hello!

It is understandable!
I did the same procedure than yesterday night on my first computer (before I uninstalled Code::Blocks, wxWidgets... etc... and restart all the procedure)...
The problem is still here! I don't understand.

I think the problem is about the configuration of the Code::Blocks installed on my computer...
I uninstalled Code::Blocks and install it again. Next, when I launched Code::Blocks It kept in memory the old projects opened, the old configuration of the compiler... etc...
Do you know how to uninstall completly Code::Blocks?
When I install it again, It doesn't ask me at the beginning to set the wx global variable... It still have the old settings... How to delete all the configuration?

Crepuscule
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on December 02, 2011, 10:19:52 am
It's good! I found where is the configuration file of Code::Blocks (C:\Documents and Settings\userName\Application Data\codeblocks). I will try deleting this folder.

Crepuscule
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on December 02, 2011, 10:26:14 am
No, I still have the same problem...
RRRrrrrr
Title: Re: Problème to compile Code::Blocks...
Post by: Alpha on December 03, 2011, 09:23:08 pm
Could you describe what the specific problem is?

Have you tried moving wxWidgets' and Code::Blocks' source directories to a path without any spaces or non-English characters (http://wiki.codeblocks.org/index.php?title=FAQ-Issues_and_Workarounds#Q:_My_project_works_everywhere_except_one_computer.3F)?

It's good! I found where is the configuration file of Code::Blocks (C:\Documents and Settings\userName\Application Data\codeblocks). I will try deleting this folder.
Yes, this is where all settings are stored (except for the .layout files created in the same directory as most projects).  If you are just trying to change/delete global variables, you can do that through Settings->Global variables...
Title: Re: Problème to compile Code::Blocks...
Post by: Crepuscule on December 05, 2011, 03:23:18 pm
Could you describe what the specific problem is?

Have you tried moving wxWidgets' and Code::Blocks' source directories to a path without any spaces or non-English characters (http://wiki.codeblocks.org/index.php?title=FAQ-Issues_and_Workarounds#Q:_My_project_works_everywhere_except_one_computer.3F)?

It's good! I found where is the configuration file of Code::Blocks (C:\Documents and Settings\userName\Application Data\codeblocks). I will try deleting this folder.
Yes, this is where all settings are stored (except for the .layout files created in the same directory as most projects).  If you are just trying to change/delete global variables, you can do that through Settings->Global variables...

My problem is:
I have 2 computers :
- On the first (the one I use in general) : I tryed to install the source code of code blocks, following the manual given on the wiki of Code::Blocks site. I did all the procedure but when I compile the Code::Blocks project and next when I run the application, a warning message appears explaining me that many plugins were not read, and the application can't work (for example, if I try to conifgure the compiler (Setting --> Compilers and debuggers...) the software crash). I can't start also a debug session...
- On my second computer, I did exactly all the same procedure of installation. At the end, when I compile and run Code::Blocks I can do everything I want (debug, confiration of code::blocks... etc...). On the second computer, I did the procedure in a virtual machine... it is the only difference.

I tryed also to change the path of code::blocks... instead of "C:\Programmation\CodeBlocks" I put the standard path : "C:\Program Files\CodeBocks"... on the both path, the application doesn't run...

At a moment, I thought the problem could be about the configuration of Code::Blocks (I remember few weeks ago, I changed some parameters on my first computer to adapt a new compiler that is not in the standard list of compilers of Code::Blocks). So, I uninstalled Code::Blocks of the computer, I deleted the folder nammed "CodeBlocks" in "C:\Documents and settings\User\ApplicationData\codeBlocks" and did again all the procedure of installation... but the problem is still here...

I don't understand what happen, I already tryed many things...

Crepuscule
Title: Re: Problème to compile Code::Blocks...
Post by: Alpha on December 07, 2011, 01:57:15 am
(I am assuming I understanding you correctly that your problem is your self-compiled Code::Blocks fails to load plugins on start-up.)
When building from source, the only way (well, almost the only way) this could occur is if you did not run update.bat after compiling.  If you did run update.bat, this means zip.exe was not on the path at that time.


As a side note (this is not really a problem),
[...]
I will begin again to start fron 0 on my first computer
[...]
if you to have the splash screen display the actual revision number, svn.exe must be in the path (I normally add [...]\svn\bin to the path in a Command Prompt window, then launch Code::Blocks from that same window) while Code::Blocks is compiling.