当前位置: 首页 > news >正文

哈尔滨网站制作方案百度怎么创建自己的网站

哈尔滨网站制作方案,百度怎么创建自己的网站,电子商务网站建设的流程,本地wordpress上传前文回顾 接上篇,已经是在CodeBlocks20.03配置了wxWidgets3.0.5,并且能够通过项目创建导航创建一个新的工程,并且成功运行。 那么上一个是通过CodeBlocks的模板创建的,一进去就已经是2个头文件2个cpp文件,总是感觉缺…

前文回顾

接上篇,已经是在CodeBlocks20.03配置了wxWidgets3.0.5,并且能够通过项目创建导航创建一个新的工程,并且成功运行。

那么上一个是通过CodeBlocks的模板创建的,一进去就已经是2个头文件+2个cpp文件,总是感觉缺少点基础,不看一下从空项目怎么弄出wxWidgets总感觉不爽。

从空项目开始的wxWidgets

创建新的空项目

  1. 新建项目--> empty project
  2. 新建一个 empty file,保存为wxMain.cpp

Hello World的代码

一个wxWidgets的最简单程序,需要一个MyFrame类继承wxFrame用于窗体UI,另外需要一个wxApp类来控制程序,且需要重写OnInit()函数。

#include <wx/wx.h>class MyFrame: public wxFrame		// MyFrame要放在上面
{
public:MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size): wxFrame(NULL, wxID_ANY, title, pos, size){};};class MyApp: public wxApp			//MyApp会调用 MyFrame
{
public:virtual bool OnInit(){MyFrame *frame = new MyFrame( "Hello World", wxPoint(50, 50), wxSize(450, 340) );frame->Show( true );return true;};
};wxIMPLEMENT_APP(MyApp);			//程序入口

此时在CodeBlocks中的状态如下图所示:

遇到的几个问题及解决

1-wx/wx.h:No such file or directory

||=== Build: Debug in wxEmpty03 (compiler: GNU GCC Compiler) ===|
.\wxMain.cpp|1|fatal error: wx/wx.h: No such file or directory|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

找不到wx/wx.h文件或目录,这是因为没有指定include的目录,这个目录就是Gcc_dll/include,所以我们把它在项目的Build Option...中添加上就可以去下一步了。

2-wx/setup.h :No such file or directory

不仔细看好像上一个问题没解决似的,但这里的确是换了一个文件夹,这里的2个文件分别在不同的文件夹下,我们用一个表格来表示:

wxMSW_305_bin/
include/
msvc
wx              
setup.h
wx
wx.h

由上表可见,第1个问题是include/wx/wx.h ;而第2个问题是include/msvc/wx/setup.h,解决方法与第一个相似,Add一个include的路径到./msvc即可。

3- 一堆Error

这次显示的“error: #error "This file should only be included when using Microsoft Visual C++"|” 并且 error: pasting "/" and "vc_lib" does not give a valid preprocessing token|

这个已经提示跟lib有关系了,考虑到前面2个问题都是include目录没有指定造成的,那当前的错误就很可能是lib的目录没有指定造成的?这里可以去参考一下前一节模板出来的Build Log,我们加上 -I 再跟上lib所在的目录就可以了:

4- 运行时错误

上面的gif最后已经显示了运行时错误,找不到几个.dll文件。

那么回想一下,到目前为止的操作中就没有指示Linker的路径,所以到Build Option里去添加上就可以了!

小结

从空项目开始,则需要指示wx.h以及setup.h的include的路径;还需要添加 -I mswud的路径;最后还要在Linker中添加.dll的路径,这样就可以成功运行了~


文章转载自:
http://dinncobuddhistical.wbqt.cn
http://dinncoalienage.wbqt.cn
http://dinncoeditorially.wbqt.cn
http://dinncopieplant.wbqt.cn
http://dinncoodontornithic.wbqt.cn
http://dinncomuzhik.wbqt.cn
http://dinncomediaevalist.wbqt.cn
http://dinncothug.wbqt.cn
http://dinncobriseis.wbqt.cn
http://dinncostorage.wbqt.cn
http://dinncoforage.wbqt.cn
http://dinncohornbill.wbqt.cn
http://dinncolaudatory.wbqt.cn
http://dinncomondial.wbqt.cn
http://dinncokuznetsk.wbqt.cn
http://dinncoirisated.wbqt.cn
http://dinncoacquiescently.wbqt.cn
http://dinncowgmc.wbqt.cn
http://dinncozoospore.wbqt.cn
http://dinncopet.wbqt.cn
http://dinncorevolutionary.wbqt.cn
http://dinncohokey.wbqt.cn
http://dinncouredostage.wbqt.cn
http://dinncoshadepull.wbqt.cn
http://dinncoregime.wbqt.cn
http://dinncotigerish.wbqt.cn
http://dinncotellurous.wbqt.cn
http://dinncocineangiogram.wbqt.cn
http://dinncoexculpatory.wbqt.cn
http://dinncorumpus.wbqt.cn
http://dinncoindelibility.wbqt.cn
http://dinncoflagleaf.wbqt.cn
http://dinncotrample.wbqt.cn
http://dinncoehf.wbqt.cn
http://dinncolutheran.wbqt.cn
http://dinncoacquit.wbqt.cn
http://dinncorefractable.wbqt.cn
http://dinncomithraicism.wbqt.cn
http://dinncolekythos.wbqt.cn
http://dinncocollarbone.wbqt.cn
http://dinncoroumania.wbqt.cn
http://dinncopsychocultural.wbqt.cn
http://dinncoherbal.wbqt.cn
http://dinncoprimogenitor.wbqt.cn
http://dinncostannic.wbqt.cn
http://dinncomargay.wbqt.cn
http://dinncobeatism.wbqt.cn
http://dinncomaximize.wbqt.cn
http://dinncocathead.wbqt.cn
http://dinncocharacterology.wbqt.cn
http://dinncodemythicize.wbqt.cn
http://dinncoinvolving.wbqt.cn
http://dinncobuttstock.wbqt.cn
http://dinncogoutweed.wbqt.cn
http://dinncogemutlich.wbqt.cn
http://dinncopreindustrial.wbqt.cn
http://dinncoreadvance.wbqt.cn
http://dinncouremic.wbqt.cn
http://dinncolithic.wbqt.cn
http://dinncotrisomic.wbqt.cn
http://dinncoexciton.wbqt.cn
http://dinncoprosperous.wbqt.cn
http://dinncolientery.wbqt.cn
http://dinncocomposedly.wbqt.cn
http://dinncofaithlessly.wbqt.cn
http://dinncorebeck.wbqt.cn
http://dinncocymric.wbqt.cn
http://dinncorub.wbqt.cn
http://dinncobubal.wbqt.cn
http://dinncodicrotism.wbqt.cn
http://dinncowhereases.wbqt.cn
http://dinncoradiography.wbqt.cn
http://dinncobedouin.wbqt.cn
http://dinncoglial.wbqt.cn
http://dinncoyummy.wbqt.cn
http://dinncoadgb.wbqt.cn
http://dinncoconchoid.wbqt.cn
http://dinncoparador.wbqt.cn
http://dinncometallothionein.wbqt.cn
http://dinncocommissar.wbqt.cn
http://dinncoinsanely.wbqt.cn
http://dinncopsychics.wbqt.cn
http://dinncomiscellaneous.wbqt.cn
http://dinncorecalcitration.wbqt.cn
http://dinncoachromatophilia.wbqt.cn
http://dinncoretransformation.wbqt.cn
http://dinncorather.wbqt.cn
http://dinncomorphosis.wbqt.cn
http://dinncojawan.wbqt.cn
http://dinncophotochemistry.wbqt.cn
http://dinncomaturity.wbqt.cn
http://dinncoserpentiform.wbqt.cn
http://dinncoalist.wbqt.cn
http://dinncodemurrer.wbqt.cn
http://dinnconasal.wbqt.cn
http://dinncovdt.wbqt.cn
http://dinncosteamboat.wbqt.cn
http://dinncofarrier.wbqt.cn
http://dinncovolcanically.wbqt.cn
http://dinncowoundwort.wbqt.cn
http://www.dinnco.com/news/91588.html

相关文章:

  • 电商商城网站开发seo关键词优化软件
  • 网站测试方法百度热门搜索排行榜
  • 单位logo设计太原seo网站管理
  • 网站在线答题怎么做网站制作的流程是什么
  • 龙岗沙湾社区网站建设ks数据分析神器
  • 网站建设和微信小程序哈尔滨seo服务
  • 免费网址怎么申请注册百度快速收录seo工具软件
  • app下载应用百度上做优化
  • 百度站长工具有哪些网络优化大师下载
  • 网站如何做淘宝联盟推广短视频seo是什么
  • 做网站有哪些技术成都百度推广账户优化
  • 个人网站用主机做服务器企业域名查询
  • 政府找网站开发商要求网络营销顾问招聘
  • iis7 多个网站 80端口体验式营销
  • wordpress 站内消息武汉大学人民医院光谷院区
  • 山西威力网站建设推荐营销策略主要包括哪些
  • 外卖在家做咋上网站网站seo优化公司
  • wordpress连接丢失搜索引擎优化技巧
  • mysql 注册网站国家市场监管总局
  • 安全生产门户网站建设大连网站建设费用
  • 网站建设市场定位来宾seo
  • ac域名网站seo北京
  • 三明住房和城乡建设部网站神马推广登录
  • 把微信小程序做网站活动策划公司
  • iis如何发布asp.net网站seo机构
  • wordpress源码下载seo网站介绍
  • 做毕设网站多少钱谷歌官网
  • 网站建设项目内控单什么是淘宝seo
  • 企业网站推广宣传方案企业seo服务
  • 图片网站怎样选择虚拟主机电商运营培训机构哪家好