源码编译设置及工程转换_第1页
源码编译设置及工程转换_第2页
源码编译设置及工程转换_第3页
源码编译设置及工程转换_第4页
源码编译设置及工程转换_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、GMesh源码编译设置及如何转换成VS2010工程GMsh源码目录:GMsh的GUI使用Fltk开发。一FLTK简介:FLTK,如同其名字所表达的:The Fast Light Tool Kit,一个轻量级的GUI开发库。但这轻量级并不代表功能的羸弱,相反,FLTK在具有基本的GUI功能之外,还拥有一些特殊的功能,比如跨平台、内置 OpenGL功能、速度更快、尺寸更小、协议宽松等。当然,缺点也是有的,比如对于复杂的界面构件支持不够,资源支持的不足等。功能简介:1. 提供丰富的跨平台的GUI构件(Widget)。有按钮,菜单,窗口等,近六十个。2. 支持OpenGL,提供Fl_GL_Window

2、,支持OpenGL相关的操作。3. 提供界面设计工具FLUID,非常方便进行界面的设计。4. 良好的跨平台移植性。5. 支持多种C+编译器,Gcc,BC,VC等等。6. 灵活性。FLTK本身可以定制,以满足不同的需要。这使得FLTK在嵌入式开发上有着极大的竞争力,这正是我要推荐使用FLTK的原因。二基于VS2010搭建FLTK开发环境HOW TO BUILD FLTK USING VISUAL STUDIO 2010= Prerequisites-In order to build FLTK from within VisualStudio 2010, you need to install

3、the VisualC developer environment from the Microsoft web site. The Express edition is free of charge and sufficient to develop FLTK applications: Downloading and Unpacking-Download FLTK from here:If you are familiar with "subversion" and like to stay current with your version, you will fin

4、d the subversion access parameters at the bottom of that page.Unpack FLTK by using an appropriate unpacker and copy the new folder into a convenient location. I have set up a "dev" folder in my home folder for all my projects. Configuring FLTK-Launch VisualStudio. Open the project file inC

5、hoose "Debug" or "Release" mode from the "Solution Configurations" menu. Building FLTK-Use the context menu of the "demo" project to "Set as StartUp Project". Then select "Build Solution" from the "Build" menu or press F7 to build

6、 all libraries. Testing FLTK-Select "Start Debugging" from the "Debug" menu or just press F5 to run the Demo program. Use "Demo" to explore all test programs. Installing FLTK-The default location for VisualC 2010 libraries and headers is here: C:Program FilesMicrosoft V

7、isual Studio 10.0VCIt is possible to move the FLTK libraries, headers, and Fluid into the respective subdirectories, so that they are available for future development without adding link and include paths to the solution. copy the entire FL directory into the include path copy all .lib files from th

8、e fltk lib directory to the VC lib directory copy fluid.exe in the fluid directory to the bin directoryI highly discourage using dll's (dynamically linking libraries) on MSWindows because they will require an installation process and likely cause version conflicts. Use the static .lib libraries

9、instead. Creating new Projects-This chapter assumes that libraries and headers are copied into C:Program FilesMicrosoft Visual Studio 10.0VCCreate a new project of type "General", "Empty Project" and add a simple "C+" file to it. The FLTK "hello" source code i

10、s a good base.Now open the Project Properties dialog and add "Comctl32.lib" and all the FLTK libraries that you want to use (at least "fltk.lib") to Additional Dependencies (Configuration Properties > Linker > Additional Dependencies). In the same dialog, add "WIN32&qu

11、ot; to the C+ Preprocessor Definitions (Configuration Properties > C/C+ > Preprocessor > Preprocessor Definitions).Compile and run your test program with F5.You can also include .fl resources: add a new Header file to your project, but let the name end in .fl. Right-click and select "O

12、pen with.". Add "fluid.exe" from the "bin" directory and set it as the default editor.To automatically compile .fl files, open the Properties editor and change the Element Type to Custom Build and click Apply. Now set the Custom Build Steps to: Command Line: fluid.exe -c %(F

13、ullPath) Description: Compiling Fluid .fl file Outputs: $(InputDir)$(InputName).cxx; $(InputDir)$(InputName).hNow add the generated .cxx file to your project as well. Whenever the .fl file is changed, the corresponding .cxx file will be recompiled.三利用CMake将GMsh源码生成为VS2010工程Build Gmsh using CMake'

14、;s graphical user interface-* Launch CMake and fill-in the two top input fields (telling where the Gmsh source directory is located and where you want the Gmsh binary to be created).* Click on "Add entry" and define the variable CMAKE_PREFIX_PATH, of type "PATH", pointing to the

15、location(s) of any external package(s) (FLTK, BLAS/LAPACK, etc.) installed in non-standard directories. (If you are using our pre-compiled "gmsh dependencies" package(/gmsh/bin/Windows/gmsh-dep-msvc2008-release.zip) with Visual Studio on Windows simply point CMAKE_PREFIX_PATH

16、 to the "gmsh-dep" directory.)* Click on "Configure" and choose your compiler (e.g. Visual Studio).* Optionally change some configuration options (re-run "Configure" every time you change some options).* Once you are happy with all the configuration options, click on "Generate".* Go to the build directory and build Gmsh using your chosen compiler. (With Visual Studio double-click on "gmsh.sln". If you are using our pre-compiled "gmsh dependencies" package you m

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论