Author Topic: error when compiling... help?  (Read 5470 times)

miguelcrush

  • Visitor
  • *
  • Posts: 1
    • View Profile
    • Email
error when compiling... help?
« on: 2008-07-08, 08:46:21 PM »
Hi everyone. Just started playing with this today. Did the tutorial in the help file... looks like its going to be fun.
Please help!
I get this error message when i try to run it:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.UnauthorizedAccessException: Access to the path "C:\Program Files\SGDK2\Library\Projects\test2\microsoft.directx.dll" is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
   at SGDK2.CodeGenerator.CompileProject(String ProjectName, String FolderName, String& errs)
   at SGDK2.frmMain.mnuFileRunProjectInDebugMode_Click(Object sender, EventArgs e)
   at System.Windows.Forms.MenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.MenuItem.ShortcutClick()
   at System.Windows.Forms.Menu.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Form.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.ProcessCmdKey(Message& msg, Keys keyData)
   at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
   at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
System
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
SGDK2IDE
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.0
    CodeBase: file:///C:/Program%20Files/SGDK2/SGDK2IDE.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System.Data
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
    Assembly Version: 1.0.5000.0
    Win32 Version: 1.1.4322.573
    CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
Microsoft.DirectX
    Assembly Version: 1.0.2902.0
    Win32 Version: 5.04.00.2904
    CodeBase: file:///c:/windows/assembly/gac/microsoft.directx/1.0.2902.0__31bf3856ad364e35/microsoft.directx.dll
----------------------------------------
Microsoft.DirectX.Direct3D
    Assembly Version: 1.0.2902.0
    Win32 Version: 9.05.132.0000
    CodeBase: file:///c:/windows/assembly/gac/microsoft.directx.direct3d/1.0.2902.0__31bf3856ad364e35/microsoft.directx.direct3d.dll
----------------------------------------
Microsoft.DirectX.Direct3DX
    Assembly Version: 1.0.2911.0
    Win32 Version: 9.12.589.0000
    CodeBase: file:///c:/windows/assembly/gac/microsoft.directx.direct3dx/1.0.2911.0__31bf3856ad364e35/microsoft.directx.direct3dx.dll
----------------------------------------
Microsoft.DirectX.DirectInput
    Assembly Version: 1.0.2902.0
    Win32 Version: 5.04.00.2904
    CodeBase: file:///c:/windows/assembly/gac/microsoft.directx.directinput/1.0.2902.0__31bf3856ad364e35/microsoft.directx.directinput.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: error when compiling... help?
« Reply #1 on: 2008-07-09, 01:48:19 AM »
what OS are you using?
Do you have administrative privileges?

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: error when compiling... help?
« Reply #2 on: 2008-07-09, 03:10:24 AM »
do you use windows vista?

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: error when compiling... help?
« Reply #3 on: 2008-07-09, 05:31:37 AM »
As the previous two posters also seem to suspect, it looks like you're running a highly security conscious OS like Vista, and it's preventing SGDK2 from writing executable files to the directory where the game is being compiled.  I don't use Vista myself so I can't suggest a specific solution, but I suspect there's some security option you can switch to allow the program more permissions to write the kinds of files it's trying to write.  It might work better if you tried saving your test project in a user directory like where you put all your documents (?).

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: error when compiling... help?
« Reply #4 on: 2008-07-09, 05:32:55 AM »
If you are in fact using windows vista, you could save all of your projects to a location that's accessible to you fully, such as a sub-directory inside of My Documents.  If you compile there, you should have no problem with that error.
Edward Dassmesser

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: error when compiling... help?
« Reply #5 on: 2008-07-10, 06:53:39 AM »
I use vista, but the first thing I did when I got it was disable half the security stuff so I don't really know exactly what to disable. :/

One thing I can suggest, if you are using vista, disable UAC. This can be done by pressing your windows key on the keyboard, and r at the same time, typing msconfig and press enter. When that loads, go into the tools tab, select disable UAC and press ok. You will then be asked to reboot your computer. Click yes.
Even if this doesn't fix your problem I highly recommend it because
A. it annoys the living daylights out of you, you say to do something and it asks are you sure every bloody time, would you do it if you weren't sure you wanted to do it?
and B. it stops some programs from working correctly.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: error when compiling... help?
« Reply #6 on: 2008-07-10, 07:42:56 AM »
Then again, it also stops viruses from attacking your computer as well, so there is a reason for it.
Edward Dassmesser

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: error when compiling... help?
« Reply #7 on: 2008-07-10, 07:56:32 AM »
UAC doesn't really stop anything virus related, it simply informs you that running exe files isn't always safe, and things like that. It's just idiot proofing, anyone who figured out how to use SGDK2 doesn't need it.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: error when compiling... help?
« Reply #8 on: 2008-07-10, 11:47:55 AM »
what