User forums > Using Code::Blocks
cbp2make - makefile generation tool
mirai:
Update: (see rev.60) Fixed errors in Windows build.
Argh... I've changed only a part of wrong code. There are macros to detect OS at compile time and switch blocks of code. In few places, an inexistent OS_WINDOWS macro was used instead of correct OS_WIN. That's my fault. Some other modules were also affected by this error.
--- Quote from: MortenMacFly ---It crashes here:
Code:
result = getenv("HOME");
-> the assignment fails as getenv returns NULL. You cannot rely on envvars being present. The envvar HOME may exist on Windows but in many cases (as in mine) it does not. You probably want to use USERPROFILE instead. However, still you'll need to evaluate the return value getenv provides in any case.
--- End quote ---
It was using "HOME" instead of "USERPROFILE" because the Unix version of code was compiled-in because of wrong macros. However, you are right, I have to insert some additional checks. I usually refer to Qt or WX for implementation of cross-platform stuff.
mirai:
Update: (see rev.66)
[+] Implemented multi-line object file lists (use "--wrap-objects" option) which makes makefiles look more user- and cvs- friendly.
[+] Added options to configure f77/f90 compilers in toolchains.
[+] Added revision number to generated makefile header.
Also, I started a complete rewrite of makefile generation code to prepare less hard-coded and more flexible infrastructure to reflect more CB build system features. cbp2make still misses good support of wide range of compilers and other build tools while CB can do so much more.
Revan:
I found one problem, when use without --wrap-object then sections OBJ_DEBUG, OBJ_RELEASE are missing. Compiled tdm-gcc 4.5.1.
mirai:
--- Quote from: Revan on March 15, 2011, 04:58:15 pm ---I found one problem, when use without --wrap-object then sections OBJ_DEBUG, OBJ_RELEASE are missing. Compiled tdm-gcc 4.5.1.
--- End quote ---
Just fixed that, see rev.72.
p.s. I was really surprised when I found that these macros are missing when I tried to update some of my makefiles because they were just fine [not so] many revisions ago.
MortenMacFly:
--- Quote from: mirai on March 15, 2011, 07:13:08 pm ---because they were just fine [not so] many revisions ago.
--- End quote ---
If you renamed your targets that that's the reason.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version