Take the 2-minute tour ×

Following the question, I am trying to modify the source code of Indy10 (IdHTTPProxyServer.pas). But failed to recompile the indy10 project... My IDE is XE2, and following are the steps I did..

  1. Remove package "Indy 10 Core Design Time" and "Indy 10 Protocols Design Time" in Menu->Component->Install Packages

  2. Open IndyProtocols.dpk

  3. Make changes in IdHTTPProxyServer.pas

  4. Compile

And then sometimes it shows error "Access violation in rtl160.bpl", sometimes it shows error "Exception xxx(any component) in coreide160.bpl at XXXXXX"

As I am not really familiar with the develop environment, I totally do not understand what is wrong ... Any help will be appreciated.


Thanks for all replies. All your suggestions make me realize the develop environment more. Finally I accept the answer of @Marcus Adams as there are more than one developers in the project. It is better not to change the source files of the IDE.

share|improve this question
Have you tried to restart delphi or the computer? Sometimes Delphi can get confused and give you strange errors. Although XE@ is much more stable than 2006. –  Toon Krijthe Jul 23 '12 at 13:04
Yeah I tried it before. But it didn't work. –  Willy Jul 23 '12 at 13:10
add comment

4 Answers

up vote 3 down vote accepted

Normally, when I change source code, I save the modified source file to my project folder. That way, just that unit gets recompiled.

If you changed a particular .pas file, just save it to your project folder and recompile. Leave the original Delphi (and Indy) source files untouched.

This also makes it easier to update in the future, since your changes don't get lost after an update, and your changes don't affect other projects.

share|improve this answer
+1 good tip to use –  Blobby Jul 23 '12 at 16:00
but you will also not get the improvements of newer Indy releases in this particular unit. In this case a revision control program makes it easy to apply modifications (see vendor branches in the Subversion documentation) –  mjn Jul 23 '12 at 16:26
@mjn, exactly what I do. –  Marcus Adams Jul 23 '12 at 16:42
add comment

There are a couple of VCL design-time packages (to do with DataSnap) that link to the bundled version of Indy. If you are going to update your indy, you need to do the following things:

  1. Find those packages (I cant remember them of the top of my head, but I will get back to you on that), and remove them from the installed packages list.
  2. Remove the bundled Indy packages from the installed packages list.
  3. Rename the bundled Indy dcu directory, so the IDE doesn't get confused about which instance of Indy dcu to use.
  4. Rename the bundled Indy bpl files, so the IDE doesnt load the wrong one.

Only then should you compile your new version of Indy.

share|improve this answer
add comment

Neither of the errors you mentioned are compiler errors. Its unlikely they are caused by the compiler itself. They are probably coming from somewhere else in the call chain leading up to the compile.

A short term solution would be to compile from the command line. MSBuild is the build engine Delphi uses under the hood.

  1. Edit whatever Indy files in the IDE as you normally would, save your changes then close the IDE.
  2. Open the Rad Studio Command Prompt from the start menu. This will make sure the proper environment variables are set to run the command line build. You could also use the standard command prompt and run rsvars.bat to accomplish the same thing.
  3. Use cd to change directories to the location of IndyProtocols.dpk
  4. Type msbuild IndyProtocols.dpk /target:Build /p:config=Release

If you want to do a debug version just change /p:config=Release to /p:config=Debug. Note that case is important when working with msbuild because the project files are xml, which is case sensitive.

Also, for what its worth you should try to avoid making changes directly to the libraries shipped with the IDE. If you found a bug in a supplied library that you need fixed for a specific project you can usually get by with copying the offending file into your project's folder and making your changes to it there. You'll also likely need to copy several other dependent files as well. If you take this approach the compiler will inform you which dependents need to be copied with errors such as Unit * was compiled with a different version of *.*

Now if you really want to debug the IDE you can try but the rtl and coreide packages used throughout the IDE and are both compiled as release versions (no debugging info) so it may be difficult to determine what's causing the errors you're seeing.

Anyways, you can run a second instance of the IDE with the IndyProtocols.dpk loaded in the project manager. Then use Run > Attach to Process from the first IDE instance to attach the debugger to the second IDE instance. After that just try building IndyProtocols.dpk from the second IDE instance. If all goes as expected the debugger will catch the errors and let you break at where they occurred so you can dig around.

share|improve this answer
Yeah you are right. They are not compiler errors. And I will also not to change the libs of IDE directly. Thx! –  Willy Jul 24 '12 at 2:35
add comment

You can skip the component / package compilation steps and simply create the Indy components at run time.

Add the Indy Lib Core/Protocols/System paths to the project search path and you are done.

share|improve this answer
add comment

Your Answer


