User forums > Using Code::Blocks
How to use cbMakefileGen ?
Loaden:
Hi, I am use C::B first, My Question: how to use cbMakefileGenPlugin?
I download from http://developer.berlios.de/projects/cbmakegen/, but in the rar package, only 'cbMakefileGen.cbplugin' file.
Can you tell me: how to use it?
thanks!!
kisoft:
--- Quote from: Loaden on February 25, 2008, 12:38:49 pm ---Hi, I am use C::B first, My Question: how to use cbMakefileGenPlugin?
I download from http://developer.berlios.de/projects/cbmakegen/, but in the rar package, only 'cbMakefileGen.cbplugin' file.
Can you tell me: how to use it?
thanks!!
--- End quote ---
Choose menu "Modules" / "Manage plugins". Press "Install new" and select cbMakefileGen.cbplugin file.
After install you can see menu: "Project" / "Form Makefile".
Loaden:
A bug in XPSP2: the makefile.gen is:
--- Code: ---# A simple makefile generator by KiSoft, 2007. mailto: kisoft@rambler.ru
# version: 0.3.11.12
# Project Variables start
CPP=cl.exe
CC=cl.exe
LD=link.exe
LIB=link.exe
WINDRES=rc.exe
# Project Variables end
# Target: Release
OBJS_RELEASE=D:\ycdeng\~temp\ga\Release\main.obj D:\ycdeng\~temp\ga\Release\resource.res D:\ycdeng\~temp\ga\Release\app.obj
Release: D:\ycdeng\~temp\ga\Release\ga.exe
D:\ycdeng\~temp\ga\Release\ga.exe: $(OBJS_RELEASE)
@echo Building executable D:\ycdeng\~temp\ga\Release\ga.exe
@link.exe /nologo /subsystem:windows /LIBPATH:Z:\cbvc\wx\lib\vc_lib /LIBPATH:Z:\cbvc\psdk\lib /LIBPATH:Z:\cbvc\lib\atl /LIBPATH:Z:\cbvc\lib /LIBPATH:"C:\Program Files\Microsoft Visual Studio 8\VC\lib" /out:D:\ycdeng\~temp\ga\Release\ga.exe wxmsw28u_core.lib wxbase28u.lib wxpng.lib wxzlib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib wsock32.lib odbc32.lib winmm.lib rpcrt4.lib $(Release) /OPT:REF /OPT:ICF /IGNORE:4089 /INCREMENTAL:NO /SUBSYSTEM:WINDOWS
D:\ycdeng\~temp\ga\Release\main.obj: main.cpp
@echo Compiling: main.cpp
@cl.exe /nologo /DWIN32 /D__WIN32__ /D__WXMSW__ /DwxUSE_UNICODE /D_UNICODE /DUNICODE /D_WINDOWS /TP /Gd /GF /EHsc /Fd"D:\ycdeng\~temp\ga\Release\\vc.pdb" /W3 /Ox /DNDEBUG /MT /O2 /EHsc /Fd"D:\ycdeng\~temp\ga\Release\\vc.pdb" /DWIN32 /D__WIN32__ /D__WXMSW__ /DwxUSE_UNICODE /D_UNICODE /DUNICODE /D_WINDOWS /IZ:\cbvc\wx\include /IZ:\cbvc\wx\lib\vc_lib\mswu /IZ:\cbvc\psdk\include /IZ:\cbvc\include\atl /IZ:\cbvc\include /I"C:\Program Files\Microsoft Visual Studio 8\VC\include" /c main.cpp /FoD:\ycdeng\~temp\ga\Release\main.obj
D:\ycdeng\~temp\ga\Release\resource.res: resource.rc
@echo Compiling: resource.rc
@rc.exe /IZ:\cbvc\wx\include /IZ:\cbvc\wx\lib\vc_lib\mswu /IZ:\cbvc\psdk\include /IZ:\cbvc\include /I"C:\Program Files\Microsoft Visual Studio 8\VC\include" -foD:\ycdeng\~temp\ga\Release\resource.res resource.rc
D:\ycdeng\~temp\ga\Release\app.obj: app.cpp
@echo Compiling: app.cpp
@cl.exe /nologo /DWIN32 /D__WIN32__ /D__WXMSW__ /DwxUSE_UNICODE /D_UNICODE /DUNICODE /D_WINDOWS /TP /Gd /GF /EHsc /Fd"D:\ycdeng\~temp\ga\Release\\vc.pdb" /W3 /Ox /DNDEBUG /MT /O2 /EHsc /Fd"D:\ycdeng\~temp\ga\Release\\vc.pdb" /DWIN32 /D__WIN32__ /D__WXMSW__ /DwxUSE_UNICODE /D_UNICODE /DUNICODE /D_WINDOWS /IZ:\cbvc\wx\include /IZ:\cbvc\wx\lib\vc_lib\mswu /IZ:\cbvc\psdk\include /IZ:\cbvc\include\atl /IZ:\cbvc\include /I"C:\Program Files\Microsoft Visual Studio 8\VC\include" /c app.cpp /FoD:\ycdeng\~temp\ga\Release\app.obj
.PHONY: clean_Release
clean_Release:
@echo Delete $(OBJS_RELEASE) D:\ycdeng\~temp\ga\Release\ga.exe
-@del /f $(OBJS_RELEASE) D:\ycdeng\~temp\ga\Release\ga.exe
--- End code ---
When D:\ycdeng\~temp\ga\Release is not exist, nmake will fail.
nmake Makefile.gen found link error, but CB work fine.
--- Code: ---Compiling: main.cpp
main.cpp
Compiling: resource.rc
Compiling: app.cpp
app.cpp
Building executable D:\ycdeng\~temp\ga\Release\ga.exe
LINK : warning LNK4001: no object files specified; libraries used
LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
D:\ycdeng\~temp\ga\Release\ga.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
Stop.
--- End code ---
kisoft:
--- Quote from: Loaden on February 26, 2008, 02:55:58 pm ---A bug in XPSP2: the makefile.gen is:
...
When D:\ycdeng\~temp\ga\Release is not exist, nmake will fail.
--- End quote ---
My plugin is a simple makefile generator only ;)
A generated makefile is base for edit. You can rename this file and edit it if you want.
--- Quote from: Loaden on February 26, 2008, 02:55:58 pm ---nmake Makefile.gen found link error, but CB work fine.
--- Code: ---Compiling: main.cpp
main.cpp
Compiling: resource.rc
Compiling: app.cpp
app.cpp
Building executable D:\ycdeng\~temp\ga\Release\ga.exe
LINK : warning LNK4001: no object files specified; libraries used
LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
D:\ycdeng\~temp\ga\Release\ga.exe : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
Stop.
--- End code ---
--- End quote ---
Sorry, I have no Visual Studio 8 for test this error. Check makefile for errors.
MortenMacFly:
--- Quote from: kisoft on February 27, 2008, 08:09:03 am ---Sorry, I have no Visual Studio 8 for test this error. Check makefile for errors.
--- End quote ---
You don't need it. You should just make sure the output directory exists. Thus within a Makefile preample (or similar) create the target directroy recursively and you are done.
Navigation
[0] Message Index
[#] Next page
Go to full version