VS2010 Release ctrl+F5 运行、双击EXE运行、F5运行 结果不一致

氰客 2014-05-04 05:46:49
环境: WIN7、VS2010 、FFMPEG
操作:调用 FFMPEG av_probe_input_buffer 接口探测网络视频流格式
  
if ((ret = av_probe_input_buffer(pb, &piFmt, "", NULL, 0, 0)) < 0)
{
char buffer[256]= {};
av_make_error_string(buffer, 256, ret);
fprintf(stderr, "probe failed![%x:%s][ret = %d]\n",piFmt, buffer, ret);
return ret;
}

现象:在工程下运行(F5 | CTRL+F5),debug,release均正常,双击运行,Debug正常,release调用报错

probe failed![0:Invalid data found when processing input][ret = -1094995529]


配置:该模块为单独DLL,被上层EXE加载调用,代码生成方式为/MT(/MD生成时 release下 CTRL+F5运行也会报同样的错)

求大神指点啊,毫无头绪!
...全文
7469 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2014-05-05
  • 打赏
  • 举报
回复
我的回复是提醒你两种运行方法的当前目录不一样。
氰客 2014-05-05
  • 打赏
  • 举报
回复
沉了,求指点解决思路啊。
赵4老师 2014-05-05
  • 打赏
  • 举报
回复
和exe文件同一目录下的.manifest文件关注一下。
氰客 2014-05-05
  • 打赏
  • 举报
回复
引用 3 楼 zhao4zhong1 的回复:
我的回复是提醒你两种运行方法的当前目录不一样。
Debug在目录下直接运行和在工程里运行结果是一致的。
氰客 2014-05-05
  • 打赏
  • 举报
回复
引用 3 楼 zhao4zhong1 的回复:
我的回复是提醒你两种运行方法的当前目录不一样。
所使用的DLL都是一样的啊。
赵4老师 2014-05-04
  • 打赏
  • 举报
回复
_getcwd, _wgetcwd Get the current working directory. char *_getcwd( char *buffer, int maxlen ); wchar_t *_wgetcwd( wchar_t *buffer, int maxlen ); Routine Required Header Compatibility _getcwd <direct.h> Win 95, Win NT _wgetcwd <direct.h> or <wchar.h> Win NT For additional compatibility information, see Compatibility in the Introduction. Libraries LIBC.LIB Single thread static library, retail version LIBCMT.LIB Multithread static library, retail version MSVCRT.LIB Import library for MSVCRT.DLL, retail version Return Value Each of these functions returns a pointer to buffer. A NULL return value indicates an error, and errno is set either to ENOMEM, indicating that there is insufficient memory to allocate maxlen bytes (when a NULL argument is given as buffer), or to ERANGE, indicating that the path is longer than maxlen characters. Parameters buffer Storage location for path maxlen Maximum length of path in characters: char for _getcwd and wchar_t for _wgetcwd Remarks The _getcwd function gets the full path of the current working directory for the default drive and stores it at buffer. The integer argument maxlen specifies the maximum length for the path. An error occurs if the length of the path (including the terminating null character) exceeds maxlen. The buffer argument can be NULL; a buffer of at least size maxlen (more only if necessary) will automatically be allocated, using malloc, to store the path. This buffer can later be freed by calling free and passing it the _getcwd return value (a pointer to the allocated buffer). _getcwd returns a string that represents the path of the current working directory. If the current working directory is the root, the string ends with a backslash ( \ ). If the current working directory is a directory other than the root, the string ends with the directory name and not with a backslash. _wgetcwd is a wide-character version of _getcwd; the buffer argument and return value of _wgetcwd are wide-character strings. _wgetcwd and _getcwd behave identically otherwise. Generic-Text Routine Mappings TCHAR.H Routine _UNICODE & _MBCS Not Defined _MBCS Defined _UNICODE Defined _tgetcwd _getcwd _getcwd _wgetcwd Example // GETCWD.C /* This program places the name of the current directory in the * buffer array, then displays the name of the current directory * on the screen. Specifying a length of _MAX_PATH leaves room * for the longest legal path name. */ #include <direct.h> #include <stdlib.h> #include <stdio.h> void main( void ) { char buffer[_MAX_PATH]; /* Get the current working directory: */ if( _getcwd( buffer, _MAX_PATH ) == NULL ) perror( "_getcwd error" ); else printf( "%s\n", buffer ); } Output C:\code Directory Control Routines See Also _chdir, _mkdir, _rmdir _chdir, _wchdir Change the current working directory. int _chdir( const char *dirname ); int _wchdir( const wchar_t *dirname ); Routine Required Header Optional Headers Compatibility _chdir <direct.h> <errno.h> Win 95, Win NT _wchdir <direct.h> or <wchar.h> <errno.h> Win NT For additional compatibility information, see Compatibility in the Introduction. Libraries LIBC.LIB Single thread static library, retail version LIBCMT.LIB Multithread static library, retail version MSVCRT.LIB Import library for MSVCRT.DLL, retail version Return Value Each of these functions returns a value of 0 if successful. A return value of –1 indicates that the specified path could not be found, in which case errno is set to ENOENT. Parameter dirname Path of new working directory Remarks The _chdir function changes the current working directory to the directory specified by dirname. The dirname parameter must refer to an existing directory. This function can change the current working directory on any drive and if a new drive letter is specified in dirname, the default drive letter will be changed as well. For example, if A is the default drive letter and \BIN is the current working directory, the following call changes the current working directory for drive C and establishes C as the new default drive: _chdir("c:\\temp"); When you use the optional backslash character (\) in paths, you must place two backslashes (\\) in a C string literal to represent a single backslash (\). _wchdir is a wide-character version of _chdir; the dirname argument to _wchdir is a wide-character string. _wchdir and _chdir behave identically otherwise. Generic-Text Routine Mapping: TCHAR.H Routine _UNICODE & _MBCS Not Defined _MBCS Defined _UNICODE Defined _tchdir _chdir _chdir _wchdir Example /* CHGDIR.C: This program uses the _chdir function to verify * that a given directory exists. */ #include <direct.h> #include <stdio.h> #include <stdlib.h> void main( int argc, char *argv[] ) { if( _chdir( argv[1] ) ) printf( "Unable to locate the directory: %s\n", argv[1] ); else system( "dir *.wri"); } Output Volume in drive C is CDRIVE Volume Serial Number is 0E17-1702 Directory of C:\write 04/21/95 01:06p 3,200 ERRATA.WRI 04/21/95 01:06p 2,816 README.WRI 2 File(s) 6,016 bytes 71,432,116 bytes free Directory Control Routines See Also _mkdir, _rmdir, system
Great Cow BASIC 0.98.02 老朽痴拙汉化版(大母牛BASIC)是一个8位芯片PIC和Atmel AVR微控制器的开放源码的BASIC编辑器。 在项目中还包括 Great Cow Graphical BASIC(大母牛图形化BASIC), 是一个基于GCASIC程序的图形化编辑器. 最新版本是2018年5月,甚至快要接近V1.00 版本!! 添加的新的功能,使Great Cow BASIC具备最简单方便的工具集-这些工具使用有趣和简单,支持超过1000个微控制器。 有关选项请参阅下载部分。那里有一个图形化的IDE 和文本IDE, 有一个编译器和最小的安装-任由你的选择。 功能特点: - 完整融合的 Great Cow BASIC编译器 - 编译器调用可通过bat批文件进行配置 - SynWrite 编辑器 - 语法高亮显示 - 代码折叠 - 子程序/函数列表 - 自动完成 - 上下文相关帮助 (F1) - 多文件选项卡 - 书签 - 双击错误编译产生源代码行 - oneclick组装/编译/闪存单片机 (F5, F6, F7, F8) - 终端由 Br@y ++ - PICpgm 和 WinPicPgm 编程软件。对于其他编程支持PicPgms 配置(pgmifcfg), 请参见 http://www.franksteinberg.de/#Mikrocontroller - 通过从微芯片中添加 pk2cmd 来实现简单的PicKit2支持 - 微芯片IPE自动化工具(...\GCB@Syn\PicKit3\IPE-Pusher.exe) - 编程-软件可通过GUI进行配置Programmer Editor - AVRdude 和 AVRdude-GUI 工具版本: - SynWrite 6.22.2290 - PPS Tool version: 0.0.5.3 - XpressLoade..exe 1.0.5.954.41244 - Putty.exe 0.63.0.0 - Terminal.exe v.19b 2013116b - TinyMultiBootloader+.exe 0.11.1.9 - WinPICgm.exe 1.9.2.5 - PK3 Gui v3.10 - IPE-Pusher.exe 3.1.1.0 - PK2 Gui v2.61.0.0 - PK2Cmd.exe v1.20 - Micronucleus.exe 2.0a4 - avrdudess.exe 2.4.6123.39693 - avrdude.exe v6.3 操作方法: -只需启动 IDE.exe -当Great Cow Basic 打开源文件时,观察工具栏。通过按钮也可尝试右键按钮,访问oneclick命令。 -通过单击工具栏上的 "GCBasic" 自定义编程软件;然后 "编辑编程首选项"。选择 "编程" 选项卡并拖/放 你的编程在上面。 -使用 "编辑..." 按钮调整编程设置。 -如果没有预安装的适合编程, 您可以添加自己的。 -如果有一个bat批处理 "FlashThis.bat"出现在与源文件相同的文件夹中,则此bat批处理文件会闪烁。 这可能对特定项目的闪烁很有用。 请查看主页: http://gcbasic.sourceforge.net 请查看其他下载选项: http://gcbasic.sourceforge.net/download.html 请查看大母牛BASIC帮助: http://gcbasic.sourceforge.net/help/ Great Cow BASIC is an open-source BASIC compiler for 8 bit Microchip PIC and Atmel AVR microcontrollers. Also included in the project is Great Cow Graphical BASIC, an icon based editor for GCBASIC programs. The latest release is May 2018. We are even closer to v1.00 release!! We have added new capabilities that make Great Cow BASIC the easiest tool set available - supporting over 1000's microcontrollers with tools to make this fun and simple. Please see the download section for your options. We have a Graphical IDE and textual IDE, we have just the compiler and we have a minimal install - it is your choice. Please see the homepage here: http://gcbasic.sourceforge.net and also see http://gcbasic.sourceforge.net/download.html for other Great Cow Basic download options. Great Cow BASIC Help http://gcbasic.sourceforge.net/help/

24,857

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧