# TeXnicCenter on Windows: Building Problems

I'm having problems building a book file (using the `memoir` class) in the latest version of TeXnicCenter on Windows 7:

1. I have a main file which uses `\includefrom{}` to include each chapter; TeXnicCenter only lets me build from that main file, otherwise it gives a long string of errors. I tried writing `%!TEX root = ../realbook.tex` at the top of each chapter file, but that doesn't help...

2. I'm building a PDF directly. When I select "Build and view current file," after it builds, TeXnicCenter opens Adobe Acrobat Reader (without opening the newly-built file) and then freezes for ~15 seconds. Is there any way to fix this?

3. I cannot build while the PDF is open. It gives me this error: `\newcommand{\blank}[1]{\rule{#1}{0.4pt}}` Is there something else I can use, maybe a PDF synchronization package for Windows?

-
Under `Build` > `Define Output Profiles...`, select the profile you are using on the left. Then click the `Viewer` tab on the right. It should show the PDF Viewer options. Under the `Close document before running (La)TeX` section, you need to activate the `DDE command` radio button and specify the "Command" `[DocClose("%bm.pdf")]`. Since I'm using Adobe Reader, my "Server" is `acroview` and "Topic" is `control`. – Werner Dec 2 '11 at 21:01
The reason you cannot build when the PDF is open, is that Adobe Reader locks the file for editing. Other PDF viewers, such as Sumatra, will not lock the file, but update it if the viewer detects changes. – Torbjørn T. Dec 2 '11 at 21:20
+1 for replacing Adobe Reader with Sumatra, at least for TeXnicCenter uses. – Mike Renfro Dec 3 '11 at 2:07
Also, I think `%TEX root = ` is a TeXworks-specific feature, and not something that TeXnicCenter supports. – Mike Renfro Dec 3 '11 at 2:11
Have you tried creating a `project`? – cmhughes Dec 3 '11 at 5:54

Since your problems except No.1 is solved, the remaining fix/trick/shortcut is to select `Build Menu` -> `Build and View Output` instead of `Build Menu` -> `Current View` -> `Build and View` which assumes that you have defined a project and indicated your main file.