如何vs2013环境配置中配置OpengGL的编程环境

用心创造滤镜
扫码下载App
汇聚2000万达人的兴趣社区下载即送20张免费照片冲印
扫码下载App
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
2、在MATLAB中安装VC++ 2008 编译器
& &打开Matlab,在 command window 中输入mbuild -setup及mex -setup的命令,过程如下:
&&&mbuild -setup
结果提示:
Please choose your compiler for building standalone MATLAB applications:
Would you like mbuild to locate installed compilers [y]/n? y
Select a compiler:&
[1] Lcc-win32 C 2.4.1 in D:\PROGRA~1\MATLAB\R2010b\sys\lcc&
[2] Microsoft Visual C++ 2008 SP1 in D:\Program Files\Microsoft Visual Studio ) &
[0] None &
Compiler: 2&
Please verify your choices: &
Compiler: Microsoft Visual C++ 2008 SP1 &
Location: D:\Program Files\Microsoft Visual Studio ) &
Are these correct [y]/n? y&
****************************************************************************&
& Warning: Applications/components generated using Microsoft Visual Studio &&
& & & & & &2008 require that the Microsoft Visual Studio 2008 run-time & & &&
& & & & & &libraries be available on the computer used for deployment. & & &&
& & & & & &To redistribute your applications/components, be sure that the & &
& & & & & &deployment machine has these run-time libraries. & & & & & & & & &
**************************************************************************** &
Trying to update options file: C:\Users\Administrator\AppData\Roaming\MathWorks\MATLAB\R2010b\compopts.bat&
From template: & & & & & & &D:\PROGRA~1\MATLAB\R2010b\bin\win32\mbuildopts\msvc90compp.bat&
Done . . .&
&接着,输入:
&& mex -setup
Please choose your compiler for building external interface (MEX) files: &
Would you like mex to locate installed compilers [y]/n? y
Select a compiler:&
[1] Lcc-win32 C 2.4.1 in D:\PROGRA~1\MATLAB\R2010b\sys\lcc&
[2] Microsoft Visual C++ 2008 SP1 in D:\Program Files\Microsoft Visual Studio )&
[0] None &
Compiler: 2&
Please verify your choices: &
Compiler: Microsoft Visual C++ 2008 SP1 &
Location: D:\Program Files\Microsoft Visual Studio ) &
Are these correct [y]/n? y&
***************************************************************************&
& Warning: MEX-files generated using Microsoft Visual C++ 2008 require&
& & & & & &that Microsoft Visual Studio 2008 run-time libraries be &
& & & & & &available on the computer they are run on.&
& & & & & &If you plan to redistribute your MEX-files to other MATLAB&
& & & & & &users, be sure that they have the run-time libraries.&
*************************************************************************** &
Trying to update options file: C:\Users\Administrator\AppData\Roaming\MathWorks\MATLAB\R2010b\mexopts.bat&
From template: & & & & & & &D:\PROGRA~1\MATLAB\R2010b\bin\win32\mexopts\msvc90opts.bat&
Done . . . &
**************************************************************************&
& Warning: The MATLAB C and Fortran API has changed to support MATLAB&
& & & & & &variables with more than 2^32-1 elements. &In the near future&
& & & & & &you will be required to update your code to utilize the new&
& & & & & &API. You can find more information about this at:&
& & & & & &/support/solutions/en/data/1-5C27B9/?solution=1-5C27B9&
& & & & & &Building with the -largeArrayDims option enables the new API.&
**************************************************************************&
根据网上某人的帮助,尝试输入两个命令,出错,首先:
-& Default options filename found in C:\Users\Administrator\AppData\Roaming\MathWorks\MATLAB\R2010b&
----------------------------------------------------------------&
-& & &Options file & & & & & = C:\Users\Administrator\AppData\Roaming\MathWorks\MATLAB\R2010b\mexopts.bat&
& & & MATLAB & & & & & & & & = D:\Program Files\MATLAB\R2010b&
-& & &COMPILER & & & & & & & = cl&
-& & &Compiler flags:&
& & & & &COMPFLAGS & & & & & = /c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD&
& & & & &OPTIMFLAGS & & & & &= /O2 /Oy- /DNDEBUG&
& & & & &DEBUGFLAGS & & & & &= /Z7&
& & & & &arguments & & & & & = &
& & & & &Name switch & & & & = /Fo&
-& & &Pre-linking commands & = &
-& & &LINKER & & & & & & & & = link&
-& & &Link directives:&
& & & & &LINKFLAGS & & & & & = /dll /export:mexFunction /LIBPATH:"D:\Program Files\MATLAB\R2010b\extern\lib\win32\microsoft" libmx.lib libmex.lib libmat.lib /MACHINE:X86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /incremental:NO /implib:"C:\Users\ADMINI~1\AppData\Local\Temp\mex_7GWwgG\templib.x" /MAP:".mexw32.map"&
& & & & &LINKDEBUGFLAGS & & &= /DEBUG /PDB:".mexw32.pdb"&
& & & & &LINKFLAGSPOST & & & = &
& & & & &Name directive & & &= /out:".mexw32"&
& & & & &File link directive = &
& & & & &Lib. link directive = &
& & & & &Rsp file indicator &= @&
-& & &Resource Compiler & & &= rc /fo "mexversion.res"&
-& & &Resource Linker & & & &= &
----------------------------------------------------------------&
& & &Usage:&
& & & & MEX [option1 ... optionN] sourcefile1 [... sourcefileN]&
& & & & & & [objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]&
& & &Use the -help option for more information, or consult the MATLAB API Guide.&
& &D:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: No file names given.&
??? Error using ==& mex at 208
Unable to complete successfully.
用help mex查看mex的用法,发现-v后面必须跟上编译文件的名字,因此,它提示没有给定文件名,遂写下
&&mex &yprime.c
结果提示:
& D:\PROGRA~1\MATLAB\R2010B\BIN\MEX.PL: Error: 'yprime.c' not found.&
??? Error using ==& mex at 208
Unable to complete successfully.
寻找原因,有人提示,没有将yprime.c放在当前路径下,
于是将Current Folder窗口切换至需编译的C或CPP的文件目录下,
&然后用&&mex yprime.c若cpp文件a.cpp调用了b.cpp中的函数,则编译时&&mex &a.cpp &b.cpp
则成功。---------------------------------------------------------------------------------------------------------------留下有用K&& mex &mexGaussianSubsample.cpp MexParams.cpp Filters.cpp Image.cpp &mexLog.cppK&& mex &mexConv2PreserveEnergy.cpp MexParams.cpp Filters.cpp Image.cpp &mexLog.cppK&& mex &&mexLocalMaxima.cpp MexParams.cpp Filters.cpp Image.cpp &mexLog.cpp
阅读(6423)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
在LOFTER的更多文章
loftPermalink:'',
id:'fks_083064',
blogTitle:'在Matlab2010b中调用VS2008编译器(Matlab2010b+VS2008混合编程环境配置)',
blogAbstract:'
1、首先应该安装了VS2008+Matlab2010b
2、在MATLAB中安装VC++ 2008 编译器
& &打开Matlab,在 command window 中输入mbuild -setup及mex -setup的命令,过程如下:
&&&mbuild -setup
结果提示:
Please choose your compiler for building standalone MATLAB applications:',
blogTag:'',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:8,
publishTime:8,
permalink:'blog/static/',
commentCount:5,
mainCommentCount:5,
recommendCount:3,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'0',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}如何vs2013中配置OpengGL的编程环境_百度知道
如何vs2013中配置OpengGL的编程环境
提问者采纳
VS2013中的配置 创建一个空白的Win32控制台应用程序 在代码最前面添加包含目录 #include 然后就可以编辑自己的OpenGL程序了 例如:复制如下代码到刚配置好的VS中 #include #include #include #include static int year = 0,spin=0
其他类似问题
为您推荐:
编程环境的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁vs2012下winpcap编程环境配置问题,求解
[问题点数:40分,无满意结帖,结帖人hgc84252]
vs2012下winpcap编程环境配置问题,求解
[问题点数:40分,无满意结帖,结帖人hgc84252]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
相关推荐:
匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。win7下搭建opengl es 2.0开发环境 | Alex Zhou的BLOG
& win7下搭建opengl es 2.0开发环境
1. 下载AMD的OpenGL ES2.0的模拟器,下载地址:
2. 下载《OpenGL ES2.0 Programming guide》里的例子代码,下载地址:
3. 安装vs, 我机器上安装的是vs2012。
4. 安装OpenGL ES2.0模拟器, 将安装目录下的AMD\OpenGL ES 2.0 Emulator v1.4\bin 以及AMD\OpenGL ES 2.0 Emulator v1.4\lib 里的 libEGL.dll 、 libGLESv2.dll 和 libEGL.lib 、libGLESv2.lib分别拷贝至vs2012\VC的bin和lib文件夹下。
5. 解压上面下载的例子代码
6. 打开OpenGL_ES_Programming_Guide_v1.0.2\Chapter_2\Hello_Triangle下的sln文件
7. 如果生成解决方案的时候出现了类似于does not match the Linker’s OutputFile property value…的警告信息,程序运行会提示没有找到exe文件,解决方案:
(1) 右键项目esUtil,配置属性-库管理器-常规-输出文件,把$(OutDir)esUtil_d.lib改成$(OutDir)esUtil.lib
(2) 右键项目Hello_Triangle:
配置属性-链接器-常规,把输出文件改成:Debug\$(ProjectName).exe
输入-附加依赖项:esUtil_d.lib改成esUtil.lib
重新生成解决方案,运行效果如下:
您可能也喜欢:
学习了OpenGL ES 2.0的基本知识后,我们来完成一个小demo:使用OpenGL ES 2.0绘制一个简单的三角形。这个demo的目的只是了解使用OpenGL ES 2.0绘制一个三角形...
Opengl es 2.0实现了可编程的图形管线,比起1.x的固定管线要复杂和灵活很多,由两部分规范组成:Opengl es 2.0 API规范和Opengl es着色语言规范。下图是Openg...1305人阅读
这两天看tutorial的openGL教程,它用了glew、glfw和glm三个库,光是环境配置就让我头疼了N久ORZ
这边记录一下我是怎么配置成功的。
glew、glfw和glm三个库都可以在SourceForge上下载到,此外还需要下载一个opengl32.lib
将glew32.dll、GLFW.dll复制到C:\WINDOWS\system32中
将glm文件夹复制到vs2010安装文件夹下的VC\Include中
将glfw.h、glew.h、wglew.h复制到vs2010安装文件夹下的VC\Include\gl中
将glew32.lib、GLFW.lib、GLFWDLL.lib、opengl32.lib复制到vs2010安装文件夹下的VC\lib中
在vs2010中打开项目属性页,在链接器→输入→附加依赖项中添加opengl32.glew32.GLFW.GLFWDLL.
最后在你的代码里包含这些就可以了:
#include &gl/glew.h&
#define GLFW_DLL
#include &gl/glfw.h&
#include &glm/glm.hpp&
关于那个#define GLFW_DLL,tutorial的源代码里没有,但是我的工程里不写这个就无法通过编译,在网上查到很多人都遇到这个问题,现在这个具体的解决方法是在老外的opengl论坛里找到的。
我的编程环境目前为止是没什么问题了,希望它一直好好的,蛋疼啊_(:зゝ∠)_
版权声明:本文为博主原创文章,未经博主允许不得转载。
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:2219次
排名:千里之外

我要回帖

更多关于 vs2013配置opencv3.0 的文章

 

随机推荐