Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Loaden on February 25, 2008, 12:38:49 pm

Title: How to use cbMakefileGen ?
Post by: 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!!
Title: Re: How to use cbMakefileGen ?
Post by: kisoft on February 26, 2008, 09:10:43 am
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!!
Choose menu "Modules" / "Manage plugins". Press "Install new" and select cbMakefileGen.cbplugin file.
After install you can see menu: "Project" / "Form Makefile".
Title: Re: How to use cbMakefileGen ?
Post by: Loaden on February 26, 2008, 02:55:58 pm
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

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.
Title: Re: How to use cbMakefileGen ?
Post by: kisoft on February 27, 2008, 08:09:03 am
A bug in XPSP2: the makefile.gen is:
...
When D:\ycdeng\~temp\ga\Release is not exist, nmake will fail.

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.

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.

Sorry, I have no Visual Studio 8 for test this error. Check makefile for errors.

Title: Re: How to use cbMakefileGen ?
Post by: MortenMacFly on February 27, 2008, 10:50:02 am
Sorry, I have no Visual Studio 8 for test this error. Check makefile for errors.
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.
Title: Re: How to use cbMakefileGen ?
Post by: kisoft on February 27, 2008, 03:27:07 pm
Sorry, I have no Visual Studio 8 for test this error. Check makefile for errors.
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.

I understand this feature. No problems with implementation. (for ex. I can see to C::B method for a directory creation).

I think when linker error no depended from directory creation.

Loaden can look linker parameters for generated makefile and C::B full command line.
Or, for example, show here full command line for linker from C::B.

Good luck!
Title: Re: How to use cbMakefileGen ?
Post by: minotauros on September 13, 2009, 04:10:43 pm
Hello,

I am new in Code::Blocks and I am trying to find a makefile generator from codeblocks. Thats how I stumbled this discussion.

I followed the instructions above but for me the plugin does not install  :(

Has anybody managed to make this work on:

Ubuntu 8.10
Code::Blocks 8.2 (from ubuntu synapric package manger or aptitude: codeblocks 8.02-0ubuntu2)

Thanks in advance  :)
Title: Re: How to use cbMakefileGen ?
Post by: kisoft on September 14, 2009, 04:05:10 pm
I can not try use my plugin on C::B v8.02. I being used this plugin on Night build C::B (http://forums.codeblocks.org/index.php/board,20.0.html (http://forums.codeblocks.org/index.php/board,20.0.html)). You will can download and install Night build version of C::B. And you can download cbMakefileGen plugin and install it (url see below). Sorry for my english.
Good luck!