Author Topic: cbMakefileGen plugin  (Read 152855 times)

Offline gd_on

  • Lives here!
  • ****
  • Posts: 797
Re: cbMakefileGen plugin
« Reply #45 on: October 18, 2007, 11:14:29 am »
I tried your plugin (cbMakefileGenVer0_3_Win32.zip) with nightly 4540 (Windows 2000, SP4)
But when I "Generate Makefile", CB crashes. An empty Makefile is generated.
Here is the beginning of codeblocks.rpt :

Error occured on Thursday, October 18, 2007 at 10:57:00.

C:\Program Files\CodeBlocks\codeblocks.exe caused an Access Violation at location 780109b3 in module C:\WINNT\system32\msvcrt.dll Reading from location 00231000.

Registers:
eax=0ad2110c ebx=0022f278 ecx=02abc043 edx=00000000 esi=00231000 edi=10011da8
eip=780109b3 esp=0022e968 ebp=0022e970 iopl=0         nv up ei pl nz ac po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=0038  gs=0000             efl=00010216

Call stack:
780109B3  C:\WINNT\system32\msvcrt.dll:780109B3  memcpy
6CCB2559  C:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CCB2559  _ZN12wxStringBase15CopyBeforeWriteEv
619B30DF  C:\Program Files\CodeBlocks\codeblocks.dll:619B30DF  _ZN12wxStringBase2atEj
61A0B025  C:\Program Files\CodeBlocks\codeblocks.dll:61A0B025  _ZN8wxString4LastEv
618060DC  C:\Program Files\CodeBlocks\codeblocks.dll:618060DC  _ZN24CompilerCommandGenerator4InitEP9cbProject
617FAC94  C:\Program Files\CodeBlocks\codeblocks.dll:617FAC94  _ZN8Compiler4InitEP9cbProject
02755798  C:\Program Files\CodeBlocks\share\codeblocks\plugins\cbMakefileGen.dll:02755798
02757874  C:\Program Files\CodeBlocks\share\codeblocks\plugins\cbMakefileGen.dll:02757874
027593C9  C:\Program Files\CodeBlocks\share\codeblocks\plugins\cbMakefileGen.dll:027593C9
6CD07305  C:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD07305  _ZN12wxEvtHandler21ProcessEventIfMatchesERK21wxEventTableEntryBasePS_R7wxEvent
6CD0765C  C:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD0765C  _ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler
6CD08629  C:\Program Files\CodeBlocks\wxmsw28u_gcc_cb.dll:6CD08629  _ZN12wxEvtHandler12ProcessEventER7wxEvent
.....

I hope you'll find the problem, because it's useful.

This first happened on a fortran project. I thought it could be because the plugin is only for C and C++, so I tried it on a C project, where it worked a month ago. But it's the same problem.

gd_on

PS : you have published a cbmakegen.mo for russian language. Could you publish also a .po file so it will be possible to build our own language translation. Thanks.
« Last Edit: October 18, 2007, 11:28:08 am by gd_on »
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: cbMakefileGen plugin
« Reply #46 on: October 22, 2007, 05:14:56 pm »
Sorry for a long silence. I have no time now.
If you can send me your <project>.cbp file (ONLY PROJECT.CBP, no more files) then I will can solve this problem more quickly.

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

Offline gd_on

  • Lives here!
  • ****
  • Posts: 797
Re: cbMakefileGen plugin
« Reply #47 on: October 22, 2007, 06:49:15 pm »
I have sent you directly by mail three examples of cbp files. Two for C projects, and one for a Fortran project.

Thanks

gd_on
« Last Edit: October 23, 2007, 08:52:33 am by gd_on »
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: cbMakefileGen plugin
« Reply #48 on: October 23, 2007, 11:04:36 am »
I have sent you directly by mail three examples of cbp files. Two for C projects, and one for a Fortran project.
Ok, I get your files. Wait.. aa.. some time (may be 1-2 days, I have a hot work now).

So, cbmakegen.po file exists into repository. You can browse this file in repository:
http://developer.berlios.de/svn/?group_id=8744
choose "Browse with HTTP" link (near right up corner).
Click on "branches" and on next screen - "alltargets". Search "cbmakegen.po" and download it.
If you want support for your language, for first time send me translated cbmakegen.mo file and say me a language name. I include your file to repository and distributive.

Thank you.
Good luck!
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: cbMakefileGen plugin
« Reply #49 on: October 23, 2007, 01:36:06 pm »
I have sent you directly by mail three examples of cbp files. Two for C projects, and one for a Fortran project.
I send you direct email. But I think then somebody want know too.

I does start your project.cbp and start my plugin.
After start I saw an error message. Error point to sdk/compiler.cpp, line 255. This file - part of C::B sdk.
However, this error may be initiated by my code. Be patient, I being continued investigation.

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

Offline Grom

  • Almost regular
  • **
  • Posts: 206
Re: cbMakefileGen plugin
« Reply #50 on: October 23, 2007, 06:42:17 pm »
Would be grate to have that plugin working. That is not fun to write in black UNIX terminal a make file a project which contains hundreds of files :shock:.
gcc+winXP+suse.

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: cbMakefileGen plugin
« Reply #51 on: October 24, 2007, 09:59:38 am »
Would be grate to have that plugin working. That is not fun to write in black UNIX terminal a make file a project which contains hundreds of files :shock:.
Sorry, I don't understand you. (If you have questions then you can send me email in russian).
Plugin is work on C/C++ projects.

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

Offline Grom

  • Almost regular
  • **
  • Posts: 206
Re: cbMakefileGen plugin
« Reply #52 on: October 24, 2007, 04:07:18 pm »
Does this plugin work under the Linux?
gcc+winXP+suse.

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: cbMakefileGen plugin
« Reply #53 on: October 24, 2007, 04:40:56 pm »
Does this plugin work under the Linux?

Yes of course. I does test this plugin on Ubuntu 6.10.

Now you can build this plugin from sources only. Last branch is /branches/alltargets (v0.3).
I have no time to support distributives for linux. Can you help me?

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

Offline Grom

  • Almost regular
  • **
  • Posts: 206
Re: cbMakefileGen plugin
« Reply #54 on: October 24, 2007, 05:57:46 pm »
I can try... I have 64 bit OpenSUSE 10.3, that have been dead and I have to reinstall it :evil:. Just say me how I can help you.

Would be grate also to write a plugin that will download  updates, compile them and install.
gcc+winXP+suse.

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: cbMakefileGen plugin
« Reply #55 on: October 25, 2007, 09:55:47 am »
I can try... I have 64 bit OpenSUSE 10.3, that have been dead and I have to reinstall it :evil:. Just say me how I can help you.

I have no experience to create a linux distributives. Somebody can help me. I have Ubuntu 6.10 only.

Would be grate also to write a plugin that will download  updates, compile them and install.

I can't help you. Time is money.

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

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: cbMakefileGen plugin
« Reply #56 on: October 26, 2007, 11:11:02 am »
I does released ver 0.3.11.10
Features:
 - Bugfix, added check to existance a compiler settings
 - Added cbmakegenempty.po file for translate to other langs

To gd_on:
 Bug concerned with compiler settings. Now I does add check to existance a compiler settings.
 Also I does add output to "Code::Blocks Debug" window before call Compiler::GenerateCommandLine. It can help to debug a generating process.
 I try my plugin on 3 your projects and found then 1 & 2 projects (c/c++) worked ok, and 3 project (fortran) send me message about absent a compiler settings (it's ok, I don't have this compiler).
You can try, trap must be is absent now. But a makefile generation is impossible before setting a compiler settings for your project.
General mine is: For generate makefile you must compile your project for beginning at once.

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

Offline gd_on

  • Lives here!
  • ****
  • Posts: 797
Re: cbMakefileGen plugin
« Reply #57 on: October 26, 2007, 12:07:10 pm »
Thanks a lot.
Works now with my C and C++ projects.
Works also with my Fortran projects, but, as you said, if I understand well, it's necessary to first generate the project then Generate the Makefile.
If you don't first generate, there are still crashes.
Let me explain :
I open the fortran project and directly click on Generate Makefile. (That's bad, I know  :( )
I obtain a message window "Unhandled exception" and three buttons at the bottom of that window. Until now it's OK.
1) If I click on the right one "Ignore", an empty Makefile is generated, but C::B continues to work.
2) If I click on the middle one "Retry", C::B crashes.
3) If I click on the left one "Quit" (? Abandonner in French), I first obtain an error message, telling me that there is an exception, in compiler.cpp at line 255, that Compiler::Init() is not called or generator is invalid, and that my C::B version is 4554. Until now, it's OK. But if I click on the OK button, C::B crashes.
It should be better if in the last 2 cases, I had a message telling me to first generate my project, at least one time, rather than a C::B crash. A crash is always frustrating, even when the user has made something wrong ! Further on, the codeblocks.rpt file has no new messages. C:BB exits without telling why.

But, nevertheless, it's OK. May be a few enhancements for the next release.

And thanks too for publishing a .po file.
I'll have a look and will send you a french translation, probably this week end.

gd_on
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline kisoft

  • Almost regular
  • **
  • Posts: 194
Re: cbMakefileGen plugin
« Reply #58 on: October 26, 2007, 01:17:17 pm »
Thanks a lot.
Works now with my C and C++ projects.

Ok.

Works also with my Fortran projects, but, as you said, if I understand well, it's necessary to first generate the project then Generate the Makefile.

For generate a simple makefile you MUST at ONCE only:

1. Create project.
2. Add files and setup project.
3. Build project with successfull result. (On build C::B create project.depend file)

For next time you can close project, open it again. You can edit sources and compile again. Many times.
Now you can generate a simple makefile.

For example, you does execute 3 steps described above. Close project. Open it again and do start "Generate Makefile".

If you don't first generate, there are still crashes.
Let me explain :
I open the fortran project and directly click on Generate Makefile. (That's bad, I know  :( )

If you does execute 3 steps, described above, this action is true.

I obtain a message window "Unhandled exception" and three buttons at the bottom of that window. Until now it's OK.

My plugin don't handled exceptions. External instance send this message.
Motive unknown for me now. I will see to sources again, more carefully.

I first obtain an error message, telling me that there is an exception, in compiler.cpp at line 255, that Compiler::Init() is not called or
generator is invalid, and that my C::B version is 4554. Until now, it's OK. But if I click on the OK button, C::B crashes.

My C::B:
svn 4556 (wxWidgets 2.8.4)
I compile it self, on my computer.

It should be better if in the last 2 cases, I had a message telling me to first generate my project, at least one time, rather than a C::B crash. A crash is always frustrating, even when the user has made something wrong ! Further on, the codeblocks.rpt file has no new messages. C:BB exits without telling why.

But, nevertheless, it's OK. May be a few enhancements for the next release.

No message windows! :) I like programs without errors.

And thanks too for publishing a .po file.
I'll have a look and will send you a french translation, probably this week end.

Ok. I will add your file to my repository and release.
Send me .po and .mo files, I will append new messages to your .po file in next releases.

Thanks a lot for bugreports and your projects for testing.
OS: WinXPSP3
wxWidgets: 2.8.12
CodeBlocks: Master github cbMakefileGen plugin:
https://github.com/kisoft/cbmakefilegen

Offline gd_on

  • Lives here!
  • ****
  • Posts: 797
Re: cbMakefileGen plugin
« Reply #59 on: October 26, 2007, 02:09:01 pm »
I think I have found a key for the problem.
I have 3 different fortran compilers on my PC : g77, g95 and gfortran.
After loading a fortran project, I open Project/Build Options.
Here I can see at the higher lever the "Selected compiler" and at a lower level, in my case "Release" (but it can be Debug also), I can also see the "Selected compiler". If both are the same, there are no problems. I can Generate Makefile now.
But if they are not the same, for example g95 at the higher level and g77 at the release level, I'll have problems if I Generate Makefile now (though generation of project and Makefile was OK the previous time, before closing C::B). I must first regenerate the project in that case. It's not necessary if both compiler declarations are the same.
You'll find effectively in my Fortran project (Motor2.cbp) I sent you a few days ago, that both "<Option compiler=" lines are not the same. First one contains gnu_g95_compiler, and the second one contains gnu_g77_compiler. Normally it is this second one I wanted to use here. The first one should be probably ignored !

gd_on
Windows 11 64 bits (23H2), svn C::B (last version or almost!), wxWidgets 3.2.4 (tests with 3.3), Msys2 Compilers 13.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).