我需要帮助设置一个示例应用程序.... [英] I need help setting up an example app....

查看:58
本文介绍了我需要帮助设置一个示例应用程序....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在学校,我们在emacs中完成所有编码工作,但我正在尝试使用Visual C ++获取在家工作的

示例应用程序.net。


在这个例子中,有4个.cpp文件(canvas.cpp,main.cpp,myDisplay.cpp

和tween.cpp)一个头文件(canvas.h)和一个makefile编译它为

linux。


tween.cpp是主文件,它只包含inlude语句

其他文件。


如何设置它以便我可以编译它并使用VC ++ .net在一台

Windows机器上运行它?

谢谢!


Brett

解决方案

" Brett Baisley" < BB ****** @ nbnet.nb.ca.REMOVE>在消息中写道

news:ec ************* @ TK2MSFTNGP11.phx.gbl ...

在学校,我们全部做我们在emacs中的编码,但我试图使用Visual C ++在家中使用
示例应用程序.net。

在这个例子中,有4个.cpp文件(canvas.cpp) ,main.cpp,
myDisplay.cpp和tween.cpp)头文件(canvas.h)和编译它的makefile
for linux。

tween.cpp是主文件,它只包含对其他文件的语句。

如何设置它以便我可以编译它并使用VC ++运行它.net on
a Windows机器?




您的示例是否使用简单的一次一个字符输出模型,即

std :: cout ?


如果是这样,请从菜单中选择File-> New-> Project。然后突出显示Visual

C ++项目 "夹"在左边的树中,向下滚动窗口

右边的Win32控制台项目图标并单击一次。然后在标有名称的

编辑框中。输入项目的简称。注意项目文件的

位置,下面两行指定。然后

单击确定按钮。现在点击应用程序设置超链接和

选择空项目。确保未选择ATL和MFC选项。

最后单击Finish按钮创建示例项目。


现在将源文件和头文件复制到你项目的位置。现在选择

项目 - >从菜单中添加现有项目。要么一次选择所有来源

和头文件,要么一次选择一个,但要确保你已经将

全部添加到项目中。然后从菜单中单击Build-> Build Solution。


如果一切顺利,您将拥有一个可执行文件,您可以在

正常方式下运行或者使用调试菜单中的任一开始选项。


如果一切都不顺利,请再次发布。新闻服务器愿意,有人差不多

总是在这里。


问候,



它没用。我收到了很多错误。以下是其中的一部分。


c:\Program Files \ Microsoft Visual Studio .NET \Vc7 \include\stdlib.h(251):

错误C2381:''退出'':重新定义; __declspec(noreturn)不同

c:\Program Files \ Microsoft Visual Studio

..NET\FrameworkSDK\include\GL\glut.h(146 ):看到''退出''的声明'

c:\Documents and Settings \Brett \ My Documents \ Visual Studio Projects\myTween\myDisplay .cpp(11):错误C2146:语法错误:缺少'';''

之前标识符''cvs''

c:\Documents and Settings \ Brett \ My Documents\Visual Studio

Projects\myTween\myDisplay.cpp(11):错误C2501:''画布'':缺少

存储级或者类型说明符

c:\ Document / Settings \ Brett \ My Documents \ Visual Studio
存储级或类型说明符


我不知道为什么。如果我在linux中使用编译器,一切都可以在

学校上运行。


还有其他的尝试吗?


William DePalo [MVP VC ++]" < WI *********** @ mvps.org>在消息中写道

news:en ************** @ TK2MSFTNGP10.phx.gbl ...

" Brett Baisley" < BB ****** @ nbnet.nb.ca.REMOVE>在消息中写道
新闻:ec ************* @ TK2MSFTNGP11.phx.gbl ...

在学校,我们完成所有编码工作emacs,但我正在尝试使用Visual C ++在家中使用
示例应用程序.net。

在示例中,有4个.cpp文件(canvas.cpp,main.cpp) ,myDisplay.cpp

和tween.cpp)一个头文件(canvas.h)和一个编译它的makefile


用于

linux。

tween.cpp是主文件,它只包含对其他文件的语句


如何设置它以便我可以在

Windows机器上使用VC ++ .net



编译并运行它?
你的例子是否使用了简单的字符 - 一次输出模型,即
std :: cout?

如果是这样,请从菜单中选择File-> New-> Project。然后突出显示Visual
C ++ Projects。 "夹"在左侧的树中向下滚动窗口



在Win32控制台项目的右侧。图标并单击一次。然后在
中标记为名称的编辑框。输入项目的简称。请注意项目文件的位置,下面两行指定。然后单击确定按钮。现在点击应用程序设置超链接和
选择空项目。确保选择ATL和MFC选项不是
。最后单击Finish按钮创建示例项目。

现在将源文件和头文件复制到项目的位置。现在
从菜单中选择Project-> Add Existing Item。要么一次选择所有源
和头文件,要么一次选择一个,但要确保已将
全部添加到项目中。然后从菜单中单击Build-> Build Solution。

如果一切顺利,您将拥有一个可执行文件,您可以使用
正常方式或使用任一启动选项运行来自调试菜单。

如果一切都不顺利,请再次发布。新闻服务器愿意,有人是
几乎总是在这里。

问候,



< blockquote>它是一个基于OpenGL的应用程序,所以也许我没有设置正确?我做了我在网上找到的b $ b,我得到了所有的文件,然后将它们放在lib文件夹中,或者说是b ++的b $ b,他们说要把它放进去。 br />

我是通过网上找到的ppt进行的,但是一张带有C ++ .NET信息的幻灯片

是中文的,剩下的都是英文的,我看不懂我想我需要添加opengl32.lib,glut32.lib和glu32.lib。某些项目

设置,但我不知道它在哪里。

" William DePalo [MVP VC ++]" < WI *********** @ mvps.org>在消息中写道

news:en ************** @ TK2MSFTNGP10.phx.gbl ...

" Brett Baisley" < BB ****** @ nbnet.nb.ca.REMOVE>在消息中写道
新闻:ec ************* @ TK2MSFTNGP11.phx.gbl ...

在学校,我们完成所有编码工作emacs,但我正在尝试使用Visual C ++在家中使用
示例应用程序.net。

在示例中,有4个.cpp文件(canvas.cpp,main.cpp) ,myDisplay.cpp

和tween.cpp)一个头文件(canvas.h)和一个编译它的makefile


用于

linux。

tween.cpp是主文件,它只包含对其他文件的语句


如何设置它以便我可以在

Windows机器上使用VC ++ .net



编译并运行它?
你的例子是否使用了简单的字符 - 一次输出模型,即
std :: cout?

如果是这样,请从菜单中选择File-> New-> Project。然后突出显示Visual
C ++ Projects。 "夹"在左侧的树中向下滚动窗口



在Win32控制台项目的右侧。图标并单击一次。然后在
中标记为名称的编辑框。输入项目的简称。请注意项目文件的位置,下面两行指定。然后单击确定按钮。现在点击应用程序设置超链接和
选择空项目。确保选择ATL和MFC选项不是
。最后单击Finish按钮创建示例项目。

现在将源文件和头文件复制到项目的位置。现在
从菜单中选择Project-> Add Existing Item。要么一次选择所有源
和头文件,要么一次选择一个,但要确保已将
全部添加到项目中。然后从菜单中单击Build-> Build Solution。

如果一切顺利,您将拥有一个可执行文件,您可以使用
正常方式或使用任一启动选项运行来自调试菜单。

如果一切都不顺利,请再次发布。新闻服务器愿意,有人是
几乎总是在这里。

问候,



At school, we do all of our coding in emacs, but I am trying to get the
example apps working at home using Visual C++.net.

In the example, there are 4 .cpp files (canvas.cpp, main.cpp, myDisplay.cpp
and tween.cpp) a header file (canvas.h) and a makefile that compiles it for
linux.

The tween.cpp is the main file, and it only contains inludes statements to
the other files.

How do I set this up so that I can compile it and run it using VC++.net on a
Windows machine?

Thanks!

Brett

解决方案

"Brett Baisley" <bb******@nbnet.nb.ca.REMOVE> wrote in message
news:ec*************@TK2MSFTNGP11.phx.gbl...

At school, we do all of our coding in emacs, but I am trying to get the
example apps working at home using Visual C++.net.

In the example, there are 4 .cpp files (canvas.cpp, main.cpp, myDisplay.cpp and tween.cpp) a header file (canvas.h) and a makefile that compiles it for linux.

The tween.cpp is the main file, and it only contains inludes statements to
the other files.

How do I set this up so that I can compile it and run it using VC++.net on a Windows machine?



Does your example use a simple character-at-a-time output model, i.e.
std::cout?

If so choose File->New->Project from the menu. Then highlight the "Visual
C++ Projects" "folder" in the tree on the left and scroll down the window on
the right to the "Win32 Console Project" icon and click it once. Then in the
edit box labeled "Name" type a short name for your project. Note the
location of your project''s files which is specified two lines below. Then
click the OK button. Now click the "Application Settings" hyperlink and
choose "Empty Project". Make sure the ATL and MFC options are NOT selected.
Finally click the Finish button to create your example project.

Now copy your source and header files to your project''s location. Now choose
Project->Add Existing Item from the menu. Either select all of the source
and header files at once or one at a time but make sure you have added them
all to the project. Then click Build->Build Solution from the menu.

If all goes well, you will have an executable which you can run in the
normal ways or by using either of the Start options from the debug menu.

If all does not go well, post again. News server willing, someone is almost
always here.

Regards,
Will


It didn''t work. I get a ton of errors. Here are just a few of them.

c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\stdlib.h(251):
error C2381: ''exit'' : redefinition; __declspec(noreturn) differs
c:\Program Files\Microsoft Visual Studio
..NET\FrameworkSDK\include\GL\glut.h(146) : see declaration of ''exit''
c:\Documents and Settings\Brett\My Documents\Visual Studio
Projects\myTween\myDisplay.cpp(11): error C2146: syntax error : missing '';''
before identifier ''cvs''
c:\Documents and Settings\Brett\My Documents\Visual Studio
Projects\myTween\myDisplay.cpp(11): error C2501: ''Canvas'' : missing
storage-class or type specifiers
c:\Documents and Settings\Brett\My Documents\Visual Studio
Projects\myTween\myDisplay.cpp(11): error C2501: ''cvs'' : missing
storage-class or type specifiers

I dunno why. If i use the compiler in linux, everything works fine at
school.

Anything else to try?

"William DePalo [MVP VC++ ]" <wi***********@mvps.org> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...

"Brett Baisley" <bb******@nbnet.nb.ca.REMOVE> wrote in message
news:ec*************@TK2MSFTNGP11.phx.gbl...

At school, we do all of our coding in emacs, but I am trying to get the
example apps working at home using Visual C++.net.

In the example, there are 4 .cpp files (canvas.cpp, main.cpp, myDisplay.cpp

and tween.cpp) a header file (canvas.h) and a makefile that compiles it


for

linux.

The tween.cpp is the main file, and it only contains inludes statements to the other files.

How do I set this up so that I can compile it and run it using VC++.net


on a

Windows machine?
Does your example use a simple character-at-a-time output model, i.e.
std::cout?

If so choose File->New->Project from the menu. Then highlight the "Visual
C++ Projects" "folder" in the tree on the left and scroll down the window


on the right to the "Win32 Console Project" icon and click it once. Then in the edit box labeled "Name" type a short name for your project. Note the
location of your project''s files which is specified two lines below. Then
click the OK button. Now click the "Application Settings" hyperlink and
choose "Empty Project". Make sure the ATL and MFC options are NOT selected. Finally click the Finish button to create your example project.

Now copy your source and header files to your project''s location. Now choose Project->Add Existing Item from the menu. Either select all of the source
and header files at once or one at a time but make sure you have added them all to the project. Then click Build->Build Solution from the menu.

If all goes well, you will have an executable which you can run in the
normal ways or by using either of the Start options from the debug menu.

If all does not go well, post again. News server willing, someone is almost always here.

Regards,
Will



Its an OpenGL based app, so maybe I don''t have it set up right? I did what I
could find on the net, I got all the files, and put them in the lib folder
of C++, where they say to put it.

I was going by a ppt I found online, but the one slide that has C++.NET info
was in chinese, the rest was all in english, and I can''t read it. I think I
have to add "opengl32.lib, glut32.lib and glu32.lib" to some project
settings, but I dunno where that is.
"William DePalo [MVP VC++ ]" <wi***********@mvps.org> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...

"Brett Baisley" <bb******@nbnet.nb.ca.REMOVE> wrote in message
news:ec*************@TK2MSFTNGP11.phx.gbl...

At school, we do all of our coding in emacs, but I am trying to get the
example apps working at home using Visual C++.net.

In the example, there are 4 .cpp files (canvas.cpp, main.cpp, myDisplay.cpp

and tween.cpp) a header file (canvas.h) and a makefile that compiles it


for

linux.

The tween.cpp is the main file, and it only contains inludes statements to the other files.

How do I set this up so that I can compile it and run it using VC++.net


on a

Windows machine?
Does your example use a simple character-at-a-time output model, i.e.
std::cout?

If so choose File->New->Project from the menu. Then highlight the "Visual
C++ Projects" "folder" in the tree on the left and scroll down the window


on the right to the "Win32 Console Project" icon and click it once. Then in the edit box labeled "Name" type a short name for your project. Note the
location of your project''s files which is specified two lines below. Then
click the OK button. Now click the "Application Settings" hyperlink and
choose "Empty Project". Make sure the ATL and MFC options are NOT selected. Finally click the Finish button to create your example project.

Now copy your source and header files to your project''s location. Now choose Project->Add Existing Item from the menu. Either select all of the source
and header files at once or one at a time but make sure you have added them all to the project. Then click Build->Build Solution from the menu.

If all goes well, you will have an executable which you can run in the
normal ways or by using either of the Start options from the debug menu.

If all does not go well, post again. News server willing, someone is almost always here.

Regards,
Will



这篇关于我需要帮助设置一个示例应用程序....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆