User forums > Using Code::Blocks

cbp2make - makefile generation tool

<< < (9/25) > >>

mirai:
Update: (see rev.91)

[+] Implemented dependency search for C/C++ source/header files. Use "--with-deps" option to generate makefile with those dependencies for every build unit.
[+] Added options to allow use of assembler.
[+] Fixed wrong working directory during makefile generation (it should have been changed to the directory of current project/workspace, but it wasn't).
[*] Few more docs for relatively stable part of code.

The dependency management feature seem to work although current implementation is mostly experimental. Please, test it with your projects.
p.s. There may be problem with extracting dependencies for projects created by CB on platform different from the one where makefile is created, e.g., extracting dependencies from project of Windows CB may fail in Unix (seems that some paths escaped required conversions).

adityagameprogrammer:
Possible Bug:
A problem in compilation-

--- Quote ---||=== cbp2make, Debug ===|
D:\Aditya\Downloads\cbp2make\cbp2make-stl-rev91\lib\stlfutils.cpp||In function 'CString GetCurrentDir()':
D:\Aditya\Downloads\cbp2make\cbp2make-stl-rev91\lib\stlfutils.cpp|261|error: 'getcwd' was not declared in this scope
D:\Aditya\Downloads\cbp2make\cbp2make-stl-rev91\lib\stlfutils.cpp||In function 'bool ChangeDir(const CString&)':
D:\Aditya\Downloads\cbp2make\cbp2make-stl-rev91\lib\stlfutils.cpp|271|error: 'chdir' was not declared in this scope
||=== Build finished: 2 errors, 0 warnings ===|

--- End quote ---

i Assume this was due to missing header file. Hence i added it

--- Code: ---#include <unistd.h>
--- End code ---
in
--- Code: ---lib\stlfutils.h
--- End code ---
.It might interest you to know that This was on a windows xp system,with the default gnu gcc compiler. The current version downloaded today 14 April .

mirai:

--- Quote from: adityagameprogrammer on April 14, 2011, 08:54:17 am ---Possible Bug:
i Assume this was due to missing header file. Hence i added it

--- Code: ---#include <unistd.h>
--- End code ---
in
--- Code: ---lib\stlfutils.h
--- End code ---
.It might interest you to know that This was on a windows xp system,with the default gnu gcc compiler. The current version downloaded today 14 April .

--- End quote ---
Hmm... this may happen in Windows if standard libc headers vary among systems (sorry, haven't tested it in Windows yet).
I will check this issue and upload an update ASAP.

Update: (see rev.93) Added missing headers.

ripcordjones:
Hi,

I love this program.  It has been very useful to me so far.

I am having one problem with it, though.  I have a project under Linux that includes a library where the version number is included in the name of the library.  (It is tcl8.4 if you're curious).  It appears that the program is assuming that the ".4" is a file extension, and so it tries to link without the "-l" flag, as it would when given an object file or the actual file name of a file to link.  Since it is really a library in the library path, the link step fails.

Any suggestions?

Thanks.

mirai:

--- Quote from: ripcordjones on April 20, 2011, 11:38:14 pm ---It appears that the program is assuming that the ".4" is a file extension, and so it tries to link without the "-l" flag, as it would when given an object file or the actual file name of a file to link. Since it is really a library in the library path, the link step fails.

--- End quote ---
Well, the program expects that libraries are named as GNU linker expects them to be, i.e., that a static library has file name "lib<something>.a" and corresponding linking option "-l<something>" without prefix "lib" and extension ".a", where <something> can be name or name plus version or anything else. If you have a library that does not follow this naming scheme, cbp2make may fail (and it actually does).

I can try to fix this by adding some logic to check if a library follows active naming scheme and change linking options accordingly.
Another solution is to rename that library file in the way that matches linker expectations or create a well-named symbolic link to the library inside your project tree or somewhere else withing linking path.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version