[CLAM] Segmentation View in Qt Designer

Ryan Brubaker ryan.brubaker at gmail.com
Tue Apr 28 14:41:47 PDT 2009

> Um... maybe clam dlls should be installed at the PATH. I don't know for
Bingo. The CLAMWidgets.dll file is dependent on the clam_core.dll file. I
just needed to add my CLAM install path to my PATH variable. Thanks!

> I also guess that you can not see the SegmentationView but neither any
> CLAM widget. Is that true or does it happens just with that widget.
Not a problem anymore as I was able to import my personal build of the
CLAMWidgets.dll into my QT installation.

I've attached a file that contains the documentation of the process I went
through to get everything compiled on Windows. I used the Wiki as a resource
but there were a couple of things I had to do differently to get everything
installed/compiled. Please feel free to use it on the wiki if you think it
might help anyone trying to build CLAM on windows.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clam-project.org/pipermail/clam-users-clam-project.org/attachments/20090428/89e23545/attachment.html>
-------------- next part --------------
The instructions for building CLAM on Windows can be found within the CLAM wiki:

I had to do things a little differently than what was specified on that page, although
it's a helpful resource. You probably want to reference both this document and that
wiki page, although I'll try to specify everything I needed to do here.

1. If you don't have an extract tool on Windows that handles gzip or tarred files, you
   may want to download 7-zip:

2. Download/install python:

3. Download/install pywin32:

4. Download/install SCONS:

5. Install MinGW
	The wiki page points to the MinGW installer url. However, because of a future 
	step (replacing gcc 3.x with gcc 4.x), I found it easier to just install MinGW 
	in pieces. That way you just install gcc 4.x from the beginning and don't have 
	to worry about installing 4.x over 3.x (gcc kept crashing on me when I did that).

	See "Manual Installation" section at:

	5a. Create a folder C:\MinGW

	5b. Download and unpackage GNU bintuils into the C:\MinGW folder:

	5c. Download and unpackage the 4.2.1-sjlj-2 gcc-core and gcc-g++ packages into the 
	    C:\MinGW folder. I answered "No" when prompted to overwrite any files:

	5d. Navigate to c:\MinGW\bin and rename any files that have a "sjlj" suffix by removing
	    that suffix.

	5e. Download and unpackage the MinGW runtime packages (both dev and dll) into the
	    C:\MinGW folder. I answered "Yes" when prompted to overwrite any files:

	5f. Download an upnackage the MinGW Win32 package into the C:\MinGW folder.

	5g. The gcc 4.2.1 package is missing a necessary dll that is packaged in the
	    4.3.0 gcc package. Download the 4.3.0 core package:

	    and extract the pthreadGC2.dll in the bin folder to C:\MinGW\bin folder.

6. Download/install MSYS:	

7. Download/instal QT 4.5.0. I ignored the error about the invalid win32 api file.

8. The CLAM website has binaries for 3rd-party dependencies of the CLAM framework. Download and
   unpack this package to c:\MinGW:

	8a. The libpthread.a file in the 3rd-party binaries is an empty file. Navigate to 
	c:\MinGW\local\lib and rename libpthread.a to libpthread.a.bak and rename a copy of libpthreadGC2.a 
	to libpthread.a.
	(Not sure if this is a valid thing to do but the SCONS config check fails unless there is a
	libpthread.a file to link against).

9. Replace the QT libraries in C:\MinGW\local\bin with those that are installed on the system.
	9a. In a DOS prompt, navigate to C:\MinGW\local\bin
	9b. Type "dir QT*" at the command line...you should see the following files:
	9c. For each of these files, overwrite it with the corresponding file from your QT installation directory
	    (e.g copy c:\qt\4.5.0\bin\QtCore4.dll .).

10. Check out the CLAM svn repository:
	svn co http://clam-project.org/clam/trunk trunk

11. Donwload/install pkg-config:
	I unzipped and installed to c:\MinGW\pgk-config

12. Configure the MSYS environment

	12a. Add the following (with appropriate paths) to the c:\MSYS\1.0\etc\profile file: 
		export PKG_CONFIG_PATH="C:\MinGW\local\lib\pkgconfig"
		export QTDIR="C:\Qt\4.5.0"

	12b. Create the following folders at c:\msys\1.0:
		<trunk>		(the path at which you checked out the CLAM svn repository)
		Python26	(Probably don't need this one once you update PATH to
				 include path to Python executable).

13. Update your Windows PATH variable, adding the following directories (with appropriate paths):

14. Start MSYS (installation should have put a Shortcut on your desktop).

15. Navigate to where you checked out the CLAM trunk and navigate to the CLAM subfolder.

16. Issue the following command to configure CLAM (install_path = where you want to install build output):

	scons configure prefix='c:\mingw\local' prefix_for_packaging=<install_path> sandbox_path='c:\mingw' verbose=TRUE xmlbackend='xmlpp' audio_backend=portaudio

	scons configure prefix='c:\mingw\local' prefix_for_packaging=<install_path> sandbox_path='c:\mingw' verbose=TRUE xmlbackend='xmlpp' audio_backend=portaudio release=yes

17. Issue the following command to build CLAM:

18. Issue the following command to install CLAM:
	scons install

19. To use the CLAM widgets in QtDesigner, copy the CLAMWidgets.dll file (located in <install_path>\bin\designer)
    to C:\qt\4.5.0\plugins\designer. You must also add <install_path>\lib to your system PATH environment variable
    as the CLAMWidgets.dll file is dependent on the clam_core.dll.

More information about the clam-users mailing list