GeneralTeXnic doesn't compile...

General information and discussion about TeXnicCenter
Post Reply
Soiram
Posts: 3
Joined: Thu Mar 22, 2007 1:29 pm

TeXnic doesn't compile...

Post by Soiram »

When I try to build a .tex file (either to DVI/pdf/ps) I get this error:

NTVDM has encountered a System Error
The handle is invalid.
Choose 'Close' to terminate the application.

And I have the options Close and Ignore.

EDIT: Well it seems that the problem is that TeXnic can't compile the original .tex file at all. I use the Cygwin environment along with the LaTeX that come's along with that. When I compile the .tex file through Cygwin environment, it works fine, creating either a DVI or a PDF file. So what have I done wrong with TeXnic?

EDIT2:If understand this correctly, TeXnic doesn't seem to be able to produce the .aux file and from that go to the .dvi one.In the lower part, when I try to compile from LATEX->DVI, I get the message:
I couldn't open file name 'C:\cygwin\home\user\thesis.aux'
Couldn't find input index file C:\cygwin\home\user\thesis nor C:\cygwin\home\user\thesis.idx.
Last edited by Soiram on Thu Mar 22, 2007 7:42 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Soroush
Posts: 21
Joined: Thu Feb 01, 2007 5:33 pm

Re: Inserting an image?

Post by Soroush »

Soiram;
I think this is similar to a problem I had some time ago. You have to change the order of the paths to the two latex.exe in Windows. (one is the Cygwin one, the other is the MikTeX one, for example). In order to compile the .tex files, you'll need to put the path to MikTeX before Cygwin in the system path.

I did this the lazy way, so right-click on My Computer and click Properties. Go to the Advanced tab and click the Environment Variables button. Under 'System variables' find the variable 'Path' and double click the value. Copy+paste it in Notepad and put the Cygwin path at the end and paste back. Close everything. Hopefully it should be fine after that.

If an expert knows how to do this more easily (maybe in command prompt?), please share.

Please tell if it works.
Soiram
Posts: 3
Joined: Thu Mar 22, 2007 1:29 pm

Re: Inserting an image?

Post by Soiram »

First, thank you for your reply Soroush. Now, if I understood what you said correctly, I should find the Path variable and add to the end the path of Cygwin which would be,for me, C:\cygwin\bin (that's where the latex.exe is). I used a ; between the paths. It doesn't work though...any other ideas?
Soroush
Posts: 21
Joined: Thu Feb 01, 2007 5:33 pm

TeXnic doesn't compile...

Post by Soroush »

Soiram wrote: First, thank you for your reply Soroush. Now, if I understood what you said correctly, I should find the Path variable and add to the end the path of Cygwin which would be,for me, C:\cygwin\bin (that's where the latex.exe is). I used a ; between the paths. It doesn't work though...any other ideas?


Did you delete the original C:\cygwin\bin from the path when you added it to the end? Maybe that's what you forgot! So it should end up something like
xxx;xxx;xxx;C:\miktex\bin;xxx;xxx;xxx;xxx;C:\cygwin\bin;


Notice that there's only one of each string and the MikTeX path is before the Cygwin path.
I hope I'm clear in my explanation! :)

Please say if it worked. (I think is should! : :D )
Soiram
Posts: 3
Joined: Thu Mar 22, 2007 1:29 pm

Re: TeXnic doesn't compile...

Post by Soiram »

Ok...there is no C:\miktex\bin in the path. In fact I haven't installed MikTeX since I had Cygwin. Does TeXnic work only with MiKteX? If so, I guess it's only logical that it won't compile my file...
Soroush
Posts: 21
Joined: Thu Feb 01, 2007 5:33 pm

TeXnic doesn't compile...

Post by Soroush »

Soiram wrote: Ok...there is no C:\miktex\bin in the path. In fact I haven't installed MikTeX since I had Cygwin. Does TeXnic work only with MiKteX? If so, I guess it's only logical that it won't compile my file...


Ok, I put "C:\miktex\bin" as an example, on my machine MikTeX is installed (and also Cygwin's latex.exe). The two caused a conflict.

Since you don't have MikTeX installed, my next suggestion would be that in TeXnicCenter you go to the Build menu and click 'Define Output Profiles...'. I don't have the porgram in front of me now, but 1) I think it has a wizard that helps you set it up 2) you can manually change the path to your latex compiler. (as well as ps, pdf and dvi viewer).

See how that goes!
derVogel
Posts: 1
Joined: Fri May 23, 2008 1:49 pm

Re: TeXnic doesn't compile...

Post by derVogel »

I had the same problem, and I found that when configuring for the first time in TexnicCenter the route to the latex.exe directory I looked for c:\cygwin\bin but we have to add the following route C:\Miktex 2.5\miktex\bin

If you do the same you just need to change the route, to do this, in texniccenter go to the Build tab and then to Define output profiles, once there change the path to the latex compiler to the mentioned above.

Best wishes
Post Reply