當前位置:首頁 » 編程軟體 » proj編譯教程

proj編譯教程

發布時間: 2022-04-15 18:41:31

A. cocos2dx proj.win32 怎麼編譯

1、Python的安裝和設置 安裝基本上就是下一步, 下一步就好了. 中間安裝路徑, 我選擇的是"C:\Python27\", 等下要用到這個路徑. 右鍵單擊「計算機」,選擇「屬性」----》「高級系統設置」,在「高級」選項卡下選擇「環境變數」! 在「系統變數」下選中「Path」

B. 怎麼配置source insight使得可以編譯C語言程序

source insight使得可以編譯C語言程序配置方法:
要想編譯c,需要配置Pc Lint。
1、假設source insight的安裝目錄在d:/pclint8,那麼pclin.exe就在這個目錄,
所有的*.lnt文件在d:/pclint8/lnt目錄下面:
打開菜單:options->custom commands
a) 添加一個新的命令名,例如:Pc Lint
b) 在run 中填入:
d:/pclint8/lint -u -ic:/lint std env-si %f
d:/pclint8 是你的Pclint所在的目錄.
c) 在path中填入:
d:/PCLint8/lnt(就是你所有*.lnt文件所在的目錄)
d) 勾選下面的選項:
Iconic Window
Capture Output
Save Files First
Parse Links in Output
File, then Line
e) 在Pattern 框中填入:
^/([^ ]*/) /([0-9]+/)
2、把這個命令加入到菜單中即可.
以上配置適用於編譯單個文件;要編譯多個文件,可以建立一個lnt文件,具體方法如下:
假設我的工程在e:/myproj下面,源文件放在e:/myproj/source下面,頭文件放在e:/myproj/include下面;假設source目錄下有文件:source1.c,source2.c;include目錄下面有incude.h;那麼我可以建立這樣一個lnt文件:
-i"e:/myproj/include" //頭文件尋找路徑
e:/myproj/source/source1.c //需要編譯的文件1
e:/myproj/source/source2.c //需要編譯的文件2
然後保存為test.lnt;把上面配置中的步驟b中的
d:/pclint8/lint -u -ic:/lint std env-si %f
改成:
d:/pclint8/lint -u -ic:/lint std test env-si
注意:
1.如果源文件引用頭文件的時候使用的是相對路徑或者完整的絕對路徑;那麼可以不用在lnt文件中加入頭文件尋找路徑;如果只是給出了頭文件的名字,而沒有給出任何路徑那麼加入頭文件尋找路徑就是必須的了.
2.無論是在si的自定義命令中輸入的配置命令還是自己寫的lnt文件中的命令都必需仔細;很多時候多個空格或者少個空格都會出錯.

C. 把java項目變成可運行的bat文件

你把編譯好的項目和bat放到同一個目錄下,裡面寫java 你main函數的名字就好了 追問: 大哥能不能說的詳細一點的 回答: bat 文件內寫java 你main函數的名字 追問: 我的項目不只一個類,還有外部jar包。你講的這樣是行不通的。 回答: 首先呢,你path下配置好jdk 在cmd中可以直接操作你編譯好的main文件使你的程序正常運行,之後呢在你程序的main函數的java文件下,創建一個xxx.bat 文件,裡面只寫一句話,就是你在cmd中運行你程序的那句 java main函數那個java文件名 補充: 編譯好的項目,在WINDOWS下可以這樣打包與執行: 1、工程目錄設置為 $\proj 2、代碼文件放到 $\proj\snake\Frame1.java/**最簡單的一個frame*/package snake; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Frame1{ public static void main(String[] args) { JFrame frame = new JFrame (); frame.addWindowListener( new WindowAdapter() { public void windowClosing( WindowEvent e ) { System.exit(0);}});frame.setVisible(true);}}3、設置manifest.mf 文件,放到目錄: $\proj\manifest.mf Main-Class: snake.Main 4、設置批處理文件,此處先編譯,後打包,再運行,放到目錄 $\proj\play.bat@echo offjavac snake\*.java java -jar snake.jar@echo on追問: 報了錯,載入驅動異常。因為我用到了外部jar包。 追問: 這位大哥.。我按著你的步驟做了一下,發現打包之後Main-Class: snake.Main 在 manifest.mf 文件中這句話不見了,我把這句話自己手動加上去了,他還是說找不到這個snake包下的main方法類。能不能給我解釋一下?ハ蕶ニ③ 的感言: 雖然不是你說的這樣解決的,不過還是非常感謝你了。

D. 如何編譯mapserver在windows環境下

編譯mapserver的時候一定要選擇一個根目錄
推薦 C 盤
在C盤下面創建一個projects目錄
將你的所以用來支持mapserver編譯的支持庫文件都放到該目錄下面
註:由於mapserver等都是開源的軟體。但是都有一定的版權。所以他們不是集成到mapserver下面的,而是有各種支持庫文件通過編譯說明文件鏈接
所有文件鏈接的說明文件在nmake.opt文件中。這是使用vc編譯的說明文件。在編譯的時候具體選擇支持什麼庫文件都可以在這里說明。

下面是具體的編譯環境
gdwin32 的bgd.lib是第一次編譯後拷貝過來的運行makemsvcimport.bat
libpng 的libpng.lib,libpngd.lib是第一次編譯後拷貝過來的vc6
freetype 的freetype2110_D.lib在vc7下面編譯成功
zlib zlib.lib 編譯成功在zlib123\contrib\vstudio\vc7用vc7
proj proj.lib 在vc7環境下編譯成功
curl libcurl.lib 在vc6編譯下成功 C:\projects\curl\lib
gdal gdal.lib 用submake.bat批處理文件執行編譯成功
pdflib 用vc7編譯成功 C:\projects\PDFlibLite
fcgi 沒有成功 將fcgi_config_x86.h改為fcgi_config.h用vc6編譯成功
jpeg 沒有編譯成功將gdal里的拷貝過來
regex 沒有編譯成功
編譯支持庫的時候比較艱難
仔細細心的查看各個支持庫中的文檔目錄。一般都會有一個可以通過的編譯。
編譯的時候也要懂得使用技巧。比如他說找不到庫文件或著什麼頭文件或源文件你都可以從其他地方拷貝一個過來。

附加nmake.opt文件的配置
#
# nmake.opt - MapServer 4.x configuration for MSVC++
#
# This VC++ configuration is used in building MAPSERVER.LIB, MAPSERV.EXE,
# and the other MapServer command-line programs.
#
# To use the makefile:
# - Open a DOS prompt window
# - Run the VCVARS32.BAT script to initialize the VC++ environment variables
# - Start the build with: nmake /f makefile.vc
#
# $Id: nmake.opt,v 1.24 2005/12/08 19:14:48 hobu Exp $
#
# Contents:
# Section I: Mapserver Options (you may want to edit)
# Section II: Support Libraries (you must edit)
# Section III: Debug Flags (no need to edit)
# Section IV: Variable Setup (should not need to edit)
# Section V: UMN GIS System Setup (should not need to edit)
# Section VI: Collect compiler flags
#
########################################################################
# Section I: Mapserver Options
########################################################################
# Uncomment the following to link mapserv.exe withh dll
DLLBUILD=1
# Set the following to point to the current directory.
MS_BASE = C:\projects\mapserver
# Optmization and related compile flags.
# Optimized, with using MSVCRT.
OPTFLAGS = /nologo /MD $(WARNING_LEVEL) $(DEBUG)
#LDFLAGS = /NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcd /DEBUG
# Debug with MSVCRT
#OPTFLAGS = /nologo /Zi /MD $(WARNING_LEVEL) $(DEBUG)
# Optimized, with LIBC.
#OPTFLAGS = /nologo $(WARNING_LEVEL) $(DEBUG)
# Input raster format options:
#
# The lite version of mapserver 4.x supports only GIF, PNG and JPEG data for
# input. If you wish to support many geospatial raster formats for input
# you will need the GDAL support library from http://www.gdal.org/.
# Once built, enable the GDAL flag, and point GDAL_DIR to the directory
# where GDAL was built.
#GDAL=-DUSE_GDAL
#GDAL_DIR=c:\projects\gdal
#
# Input vector format options
#
# The lite version of Mapserver 4.x only suports ESRI shapefiles for input.
#
# The OGR library (part of GDAL) supports a variety of geospatial vector
# formats including mapinfo, Arc/Info binary coverages, S-57, SDTS,
# Microstation DGN (pre-v7), TIGER, UK .NTF. It also include support for
# treating non-spatial tablular data from ODBC, CSV, mysql, Oracle Spatial,
# and PostgreSQL as spatial table with use of the VRT (virtual) driver.
#
# NOTE: Both -DUSE_OGR and -DUSE_GDAL need to be defined if you want to
# use GDAL/OGR for both raster and vector support, but GDAL_DIR needs only
# be defined once.
#
#OGR=-DUSE_OGR
#GDAL_DIR=c:\projects\gdal
# JPEG Input:
# JPEG input for raster layers is also available through GDAL, If you wish
# to build support for JPEG without GDAL, uncomment the following flag
# and provide the full path to the jpeg support library project directory.
# See http://www.ijg.org/ for support library.
JPEG=-DUSE_JPEG
JPEG_DIR=c:/projects/libjpeg
# Output format options:
# If you wish to allow JPEG output maps, uncomment the following flag.
# If not using a GD build with an internal of libjpeg, you will
# also need to uncomment JPEG_DIR and point to it; however, with BGD.DLL
# that is not necessary.
OUTPUT_JPEG=-DUSE_GD_JPEG
JPEG_DIR=c:/projects/libjpeg
# If you wish to allow PNG output maps, uncomment the following flag.
# If not using a GD build with an internal of libpng, you will
# also need to uncomment PNG_DIR and ZLIB_DIR and point to it; however, with
# BGD.DLL that is not necessary.
# See http://www.libpng.org/pub/png/libpng.html for support library.
# See http://www.gzip.org/zlib/ for support library.
OUTPUT_PNG=-DUSE_GD_PNG
PNG_DIR=c:/projects/libpng
ZLIB_DIR=c:/projects/zlib
#flag to indicate the use of zlib library. It is used intially in SVG
#output to compressed files.
ZLIB=-DUSE_ZLIB
# If you wish to allow Windows BMP output maps, uncomment the following flag.
OUTPUT_WBMP=-DUSE_GD_WBMP
# If you wish to have FLASH output, uncomment the following flag and provide
# the full path to the MING support library project directory.
# See http://ming.sourceforge.net/ for support library.
#MING=-DUSE_MING_FLASH
#MING_DIR=c:/projects/ming-0.3beta1

# If you wish to have PDF output, uncomment the following flag and provide the
# full path to the PDF support library project directory.
# See http://www.pdflib.com/ for support library.
PDF=-DUSE_PDF
PDF_DIR=c:/projects/PDFlibLite

# Annotation fonts.
#
# If you wish to annotate your maps with true type fonts unccomment the
# following flag. Provide the full path to the FreeType 2.x external
# support library, unless it is provided within your GD build as is the
# case with BGD.DLL.
# See http://www.freetype.org for support library.
ANNOTATION_FT=-DUSE_GD_FT
FT_DIR=c:/projects/freetype

# Direct connectivity to Postgresql PostGIS.
#
# To turn on direct connectivity to Postgresql PostGIS uncomment the following
# flag and set the full path name to the project directory for the
# Postgresql native Win32 client library.
# See http://www.postgresql.org for support library.
#POSTGIS =-DUSE_POSTGIS
#POSTGIS_DIR =c:/projects/libpq
#Orcale
ORACLE_DIR = c:\Oracle\Ora81
ORACLE=-DUSE_ORACLESPATIAL
# Direct connectivity to ArcSDE.
#
# To turn on direct connectivity to ArcSDE uncomment the following
# flag and set the full path name to the project directory for ArcSDE.
# Since ESRI includes the version number in the name of their libraries
# you may need to change that number in Section III of this configuration
# file.
# See http://www.esri.com/software/arcgis/arcinfo/arcsde/index.html for
# support library
#
#
#SDE_OPT=-DUSE_SDE -DWIN32
#SDE_DIR=c:/my_path_to/arcsde
# EPPL7 Support
#
# This activates ERDAS as well. It is included in the distribution.
# Probably the best raster alternative if
# you've got EPPL7 laying around. See http://www.lmic.state.mn.us/ for
# more information.
# Uncomment out the following flag and set the full path name to the
# epplib.obj file.
#EPPL=-DUSE_EPPL
#EPPL_OBJ=c:/my_path/epplib.obj
# If you want to ignore missing datafile errors uncomment the following
# line. This is especially useful with large tiled datasets that may not
# have complete data for each tile.
IGNORE_MISSING_DATA=-DIGNORE_MISSING_DATA
# If you want to use shape Z and M parameter this option must be set.
# It's OFF by default.
#USE_POINT_Z_M=-DUSE_POINT_Z_M
USE_POINT_Z_M=
#NEED_NONBLOCKING_STDERR=-DNEED_NONBLOCKING_STDERR
ENABLE_STDERR_DEBUG=-DENABLE_STDERR_DEBUG
# If you want antialiasing (note that It requires gd2)
USE_GD_ANTIALIAS=-DUSE_GD_ANTIALIAS
# Enable if you want thread safe locking, not needed for simple CGI.
#THREADS=-DUSE_THREAD
# Use this flag to compile with WMS Server support.
# To find out more about the OpenGIS Web Map Server Specification go to
# http://www.opengis.org/
WMS=-DUSE_WMS_SVR
# Use this flag to compile with WMS Client support. WMS Client support
# allows you to pull layers from other OGIS WMS servers on the interent and
# incorporate them into your map.
# To find out more about the OpenGIS Web Map Server Specification go to
# http://www.opengis.org/
# you need the libcurl library from http://curl.haxx.se/library/c/
# Set the full path to the curl project directory.
# You may also need to the full path to the windows socket library.
#WMSCLIENT= -DUSE_WMS_LYR
CURL_DIR=c:/projects/curl
#CURL_DIR=c:/projects/curl-7.10.7
WINSOCK_LIB = "WSOCK32.LIB"
WINSOCK_LIB = "C:\Program Files\Microsoft Visual Studio\VC98\Lib\WSOCK32.LIB"
# Use -DUSE_WFS_SVR to compile with WFS server support, requires OGR and PROJ4
#WFS=-DUSE_WFS_SVR
# Use -DUSE_WFS_LYR to compile with WFS client support, requires libcurl
#WFSCLIENT= -DUSE_WFS_LYR
# Use -DUSE_WCS_SVR to compile with WCS server support, requires GDAL.
#WCS=-DUSE_WCS_SVR
#libiconv support is used for to support double bytes (see bug 911).
#uncomment the following to build with libiconv support.
#ICONV=-DUSE_ICONV
#
# Reprojecting.
# If you would like mapserver to be able to reproject data from one
# geographic projection to another, uncomment the following flag
# Proj.4 distribution (cartographic projection routines). PROJ.4 is
# also required for all OGC services (WMS, WFS, and WCS).
#
# For PROJ_DIR use full path to Proj.4 distribution
PROJ=-DUSE_PROJ -DUSE_PROJ_API_H
PROJ_DIR=c:\projects\proj
# php Mapscript.
# If you plan to build PHP mapscript uncomment the following flag and
# set the full path to the PHP project directory
#PHP=1
#PHP_DIR=c:\projects\php-4.3.4
# Apparently these aren't as commonplace. Edit the
# following line to reflect the missing functions on your platform.
#
#STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRDUP
STRINGS=-DNEED_STRCASECMP -DNEED_STRNCASECMP -DNEED_STRLCAT

########################################################################
# Section II: External Support Libraries
########################################################################
# You will need to set the paths to various support library projects
# that you have compiled.

E. 在avrstudio軟體編譯過程中,出現了unknow name type proj_char,這個問題怎麼解決啊

用的wingcc吧 缺個頭文件
#include <avr/pgmspace.h>

F. 如何使用C++Builder編譯Delphi使用Obj文件

一直以來,Delphi 都可以用命令行 dcc32 ProjectName.dpr 對項目進行編譯鏈接,非常方便,Delphi對項目文件的參數配置處理的很簡單,便於閱讀處理起來也很直觀,編譯的中間文件也很簡單(dcu,dcp)。
而C++Builder就沒那麼幸運了,因為包含了C++的特徵,各種編譯的中間文件:lib,obj,res,map,tds。後來新版又增加了一些預編譯文件:ilc,ild,ilf,...,pch,#00,...等等等等,各種搜索路徑(Include Path,Library Path,Browse Path...),要是用bcc32及ilink32手工進行編譯鏈接,命令的參數都足夠寫上大半天。幸好,在舊版C++Builder中,如果要用命令行編譯BCB項目,只要將bpr文件轉換為mak文件,再使用make命令進行編譯鏈接也比較方便,不需要過多的處理:
[plain] view plainprint?
bpr2mak -oProject1.mak Project1.bpr
make -fProject1.mak

自從Delphi/C++Builder開始使用 MSBuild* 編譯系統後(好像是RAD Studio 2006開始,具體忘記了),Delphi項目在保存為dpr的同時,也會保存一份dproj的項目文件,dpr依舊沿用舊格式,dproj 則以MSBuild規范以XML格式保存,除了可以用舊方式命令行編譯dpr外,也可以用:

[plain] view plainprint?
msbuild.exe /t:Rebuild /p:Config=Debug ProjectName.dproj

進行編譯,但msbuild必須設定一些環境變數,RAD Studio自帶了一個命令行工具已經做好了這些,其實就是設定了以下幾個環境變數($(BDS)\bin\rsvars.bat):

[plain] view plainprint?
@SET BDS=C:\Embarcadero\RAD Studio\7.0
@SET BDSCOMMONDIR=C:\Users\Public\Documents\RAD Studio\7.0
@SET FrameworkDir=C:\Windows\Microsoft.NET\Framework\v2.0.50727
@SET FrameworkVersion=v2.0.50727
@SET FrameworkSDKDir=
@SET PATH=%FrameworkDir%;%FrameworkSDKDir%;%PATH%
@SET LANGDIR=EN

C++Builder則又更杯具了一些,bpr2mak.exe工具已經沒有了,所以只能採用MSBuild進行命令行編譯。更加杯具的是,隨著Delphi和BCB被多次轉賣收購,新版本的發布似乎總會有各種各樣的Bug,比如手頭的RAD Studio 2009進行命令行編譯,Delphi正常,BCB則報出超過100個錯誤,類似如下:

[plain] view plainprint?
C:\Embarcadero\RAD Studio\7.0\Bin\CodeGear.Cpp.Targets(2175,3): error : Error: Unresolved external '__fastcall Strhlpr::UnicodeFree(System::UnicodeString&)' referenced from C:\EMBARCADERO\RAD STUDIO\7.0\LIB\DEBUG\VCLE.LIB|ustring
C:\Embarcadero\RAD Studio\7.0\Bin\CodeGear.Cpp.Targets(2175,3): error : Error: Unresolved external 'Typinfo::BooleanIdents' referenced from C:\EMBARCADERO\RAD STUDIO\7.0\LIB\DEBUG\VCLE.LIB|vclinit

檢查了一下發現編譯過程(bcc32.exe)沒有問題,只是在ilink32.exe鏈接過程中報錯,在IDE中打開此項目進行編譯,查看Message->Output窗口,比較兩者的ilink32命令行參數,發現兩者有兩個地方有明顯差異,一個是IDE生成的命令中沒有類似 C:\Embarcadero\RAD Studio\7.0\lib\EN\debug 的路徑(指的是EN這個目錄,去除上面rsvars.bat中的@SET LANGDIR=EN 就可以避免產生這樣的搜索路徑) ,但是雖然這個目錄不存在,也應該不至於導致出錯。第二個差異是缺少了rtl.bpi和vcl.bpi的附加obj參數,解決辦法是在$(BDS)\bin目錄中找到 CodeGear.Cpp.Targets 文件,用記事本打開,搜索字元「memmgr.lib「,在前面加上"rtl.bpi;vcl.bpi" (用;分隔,不含引號),一共有兩處要修改。或者查找 "c0w32",在後面加上 "rtl.bpi;vcl.bpi",只有一處修改 —— 因為IDE的命令行中 rtl.bpi vcl.bpi是在c0w32和memmgr.lib中間的。—— (注意:在XE2中,加在c0w32後面已經不管用了,編譯會報另一個錯誤VCL.BPIW.OBJ不存在,Targets文件有很大變化,可能參數的位置變動過了,導致與其他參數混在一起,所以還是加到memmgr.lib處更加合理)。

一些組件包比如DevExpress的Package,沒有dproj或者cproj 項目文件,只能通過IDE進行轉換,但坑爹的是bpk在好幾個版本以前(CRS 2007?)已經不支持bpk項目,根本打不開也談不上轉換了,但它其實是一個make文件,可惜用make命令編譯還是要出錯,不想去研究了。總之,BCB永遠活在Delphi的陰影下。

G. 頭文件和源文件有什麼區別

頭文件和源文件的區別表現在:後綴不同、內容不同。

1、後綴不同

後綴為.h的文件是頭文件。

後綴為.c的文件是源文件,內含函數實現,變數定義等內容。

2、內容不同

頭文件用來寫類的聲明(包括類的成員的聲明和方法聲明)、函數原型、#define常數等。

源文件主要寫實現頭文件中已經聲明的那些函數的具體代碼。



頭文件的組成

頭文件一般由四部分內容組成:

(1)頭文件開頭處的版權和版本聲明;

(2)預處理塊;

(3)inline函數的定義;

(4)函數和類結構聲明等。

在頭文件中,用ifndef/define/endif結構產生預處理塊,用#include格式來引用庫的頭文件。頭文件的這種結構,是利用C語言進行開發軟體所通常具備的,屬於公有知識。

H. android環境下cocos2dx-3.13.1,新建項目後proj.android下沒有build_native.py腳本文件,如何編譯項目

好像最近幾個版本不能使用build_native.py來build c++內容了,你這個項目都沒這個文件應該是完全取消了這個項目的生成方式。不如你試試命令行:
cocos compile -p android
如果不行,最好看一下官方怎麼說的。

熱點內容
安卓手機如何繞過緩存軟體 發布:2025-03-16 22:35:16 瀏覽:241
c語言求職 發布:2025-03-16 22:34:23 瀏覽:429
在線教育培訓源碼 發布:2025-03-16 22:31:57 瀏覽:233
反編譯vb工具 發布:2025-03-16 22:27:04 瀏覽:353
安卓流程為什麼越來越多 發布:2025-03-16 22:26:50 瀏覽:933
五軸編程模型 發布:2025-03-16 22:17:48 瀏覽:181
linuxc函數庫 發布:2025-03-16 22:03:33 瀏覽:921
iphone最新版系統從哪裡改密碼 發布:2025-03-16 21:56:19 瀏覽:596
python的execute 發布:2025-03-16 21:40:24 瀏覽:767
今天的訪問量就靠你了 發布:2025-03-16 21:39:35 瀏覽:430