visual studio 2013 release compilation dont open files

0

I have searched in other answers but i dont found how to fix it and i cant understand why this happens someone can help?

When i compile with debug mode every thing runs ok, even if i change the debug configuration from Multi-threaded Debug DLL (/MDd) to Multi-threaded DLL (/MD) but when compile with release program crashes when try to open file with

std::ofstream inFile(fileNamePath, std::ios_base::app | std::ios_base::out);

dont know how many others errors have more because when program begins run he opens a configuration file and crash.

in buid time this message apears

LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library

and when the program begins run this happens on debug

'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcp120.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\wsock32.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\crypt32.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr120d.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ws2_32.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcr120.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msasn1.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\nsi.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sspicli.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\cryptbase.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Symbols loaded.
'Servidor.exe' (Win32): Loaded 'C:\Windows\SysWOW64\bcryptprimitives.dll'. Symbols loaded.
First-chance exception at 0x777CDF63 (ntdll.dll) in Servidor.exe: 0xC0000005: Access violation writing location 0x00000014.
Unhandled exception at 0x777CDF63 (ntdll.dll) in Servidor.exe: 0xC0000005: Access violation writing location 0x00000014.

all other files have been configured whith Multi-threaded Debug DLL (/MDd) for debug and Multi-threaded DLL (/MD) for release.

c++
visual-studio-2013

1 Answer

1

My educated guess you are mixing debug and release configuration.

Try to compile your code with Multi-threaded DLL (as you did) in release without optimizations so you get a program that can be debugged and uses the same CRT.

answered on Stack Overflow Jul 20, 2015 by DeJaVo

User contributions licensed under CC BY-SA 3.0