LightbulbI'm getting error , pls help

Posts 1–7 of 7 · Page 1 of 1
I'm getting error , pls help
Hello all,
I recently started to learn C++ , now i made this really simple code for a little calculator , here it is :

// operating with variables

#include <iostream>
using namespace std;

int main ()
{
// declaring variables
int a, b;
int result;

// process:
a = 5;
b = 2;
a = a + 1;
result = a - b;

// print out the result
cout << result;

// terminate the program
return 0;
}

and now i want to Debug and eventualy start it , but then i get the error :

Unable to start program 'C/..................../niks.dll

So how can i fix this ? Cus i dont get it ... What did i do wrong ?

I know it hasnt anything to do with hacks (Yet) but pls help me
change application type from dll to console application
Quote Originally Posted by A7med.love View Post
change application type from dll to console application
where to do that ? i got C++ 210 express ...

Edit : I changed it from .dll to .exe but when i debug it then there opens an empty black window wich closes instantly and then i get this :

'niks.exe': Loaded 'C:\Users\Hoofdaccount\Documents\Visual Studio 2010\Projects\niks\Debug\niks.exe', Symbols loaded.
'niks.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\mscoree.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'niks.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'niks.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\msc oreei.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr .dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\msvcr100_clr0400.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\ms corlib\dc0b188b244ec4a4ccec59ac6f1620ad\mscorlib.n i.dll', Cannot find or open the PDB file
'niks.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib \v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
'niks.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\nls sorting.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'niks.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\Hoofdaccount\documents\visual studio 2010\Projects\niks\Debug\niks.exe', Symbols loaded.
'niks.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr jit.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\dia symreader.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\Sy stem\4532468deac0fdeff26329333c7642b6\System.ni.dl l', Cannot find or open the PDB file
'niks.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System \v4.0_4.0.0.0__b77a5c561934e089\System.dll'
The thread 'Win32 Thread' (0x944) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x314) has exited with code 0 (0x0).
The thread 'Main Thread' (0x15ac) has exited with code 0 (0x0).
The program '[4032] niks.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).
The program '[4032] niks.exe: Native' has exited with code 0 (0x0).

So yeah ... must be doing something wrong ...
Quote Originally Posted by Horror View Post
where to do that ? i got C++ 210 express ...

Edit : I changed it from .dll to .exe but when i debug it then there opens an empty black window wich closes instantly and then i get this :

'niks.exe': Loaded 'C:\Users\Hoofdaccount\Documents\Visual Studio 2010\Projects\niks\Debug\niks.exe', Symbols loaded.
'niks.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\mscoree.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\msvcr100d.dll', Symbols loaded.
'niks.exe': Loaded 'C:\Windows\SysWOW64\msvcp100d.dll', Symbols loaded.
'niks.exe': Loaded 'C:\Windows\SysWOW64\advapi32.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\msvcrt.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\sechost.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\rpcrt4.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\sspicli.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\cryptbase.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\msc oreei.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\shlwapi.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\gdi32.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\user32.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\lpk.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\usp10.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\imm32.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\msctf.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr .dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\msvcr100_clr0400.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\ms corlib\dc0b188b244ec4a4ccec59ac6f1620ad\mscorlib.n i.dll', Cannot find or open the PDB file
'niks.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib \v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
'niks.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\nls sorting.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\SysWOW64\ole32.dll', Cannot find or open the PDB file
'niks.exe' (Managed (v4.0.30319)): Loaded 'C:\Users\Hoofdaccount\documents\visual studio 2010\Projects\niks\Debug\niks.exe', Symbols loaded.
'niks.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr jit.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\dia symreader.dll', Cannot find or open the PDB file
'niks.exe': Loaded 'C:\Windows\assembly\NativeImages_v4.0.30319_32\Sy stem\4532468deac0fdeff26329333c7642b6\System.ni.dl l', Cannot find or open the PDB file
'niks.exe' (Managed (v4.0.30319)): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System \v4.0_4.0.0.0__b77a5c561934e089\System.dll'
The thread 'Win32 Thread' (0x944) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x314) has exited with code 0 (0x0).
The thread 'Main Thread' (0x15ac) has exited with code 0 (0x0).
The program '[4032] niks.exe: Managed (v4.0.30319)' has exited with code 0 (0x0).
The program '[4032] niks.exe: Native' has exited with code 0 (0x0).

So yeah ... must be doing something wrong ...
Add: cin.get();
Wrong section
If you're using a microsoft compiler hit ctrl+f5, because it closes when debugging is finished, this runs it without debugging, and dlls can't be run directly so use an exe
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us