Author Topic: How to use cbMakefileGen ?  (Read 9815 times)

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
How to use cbMakefileGen ?
« 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!!

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: How to use cbMakefileGen ?
« Reply #1 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".
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: How to use cbMakefileGen ?
« Reply #2 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.
« Last Edit: February 26, 2008, 03:03:17 pm by Loaden »

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: How to use cbMakefileGen ?
« Reply #3 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.

OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: How to use cbMakefileGen ?
« Reply #4 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: How to use cbMakefileGen ?
« Reply #5 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!
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

minotauros

  • Guest
Re: How to use cbMakefileGen ?
« Reply #6 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  :)

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: How to use cbMakefileGen ?
« Reply #7 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). 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!
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen