Code::Blocks Forums

User forums => Nightly builds => Topic started by: killerbot on April 22, 2008, 06:45:29 pm

Title: The 22 April 2008 build (5010) is out.
Post by: killerbot on April 22, 2008, 06:45:29 pm
Get quick announcements through the RSS feed http://www.codeblocks.org/nightly/CodeBlock_RSS.xml

Before you use a nightly make sure you understand how it works (http://forums.codeblocks.org/index.php/topic,3232.0.html).

A link to the unicode windows wxWidget dll for Code::Blocks : http://prdownload.berlios.de/codeblocks/wxmsw28u_gcc_cb_wx287.7z

For those who might need this one (when no MingW installed on your system) : the mingw10m.dll : http://prdownload.berlios.de/codeblocks/mingwm10_gcc421.7z

The 22 April 2008 build is out.
  - Windows :
   http://prdownload.berlios.de/codeblocks/CB_20080422_rev5010_win32.7z
  - Linux :
   none

Resolved Fixed:


Regressions/Confirmed/Annoying/Common bugs:


Title: Re: The 22 April 2008 build (5010) is out.
Post by: CracKPod on April 22, 2008, 07:44:27 pm
Following Error occured when trying to compile a Dynamic Link Library (DLL)

I'm using build 5010 with the MinGW library included in the official release.

Tab: Build Log:
Code

-------------- Build: Release in SampleHook ---------------

Compiling: main.cpp
In file included from C:\Programme\CodeBlocks\Projects\SampleHook\main.cpp:2:
C:\Programme\CodeBlocks\Projects\SampleHook\detours.h:611:8: warning: extra tokens at end of #endif directive
mingw32-g++.exe: /W3: No such file or directory
mingw32-g++.exe: /DBUILD_DLL: No such file or directory
mingw32-g++.exe: /Ox: No such file or directory
mingw32-g++.exe: /DNDEBUG: No such file or directory
mingw32-g++.exe: /MD: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 1 warnings
 

Tab: Build messages:
Code
C:\Programme\CodeBlocks\Projects\SampleHook\detours.h|611|warning: extra tokens at end of #endif directive|
||=== Build finished: 0 errors, 1 warnings ===|

Well actually Code::Blocks just "compiles" the dll with a warning but in real it doesn't even create the dll which should be located at:

"C:\Programme\CodeBlocks\Projects\SampleHook\bin\Release"

The mingw32-g++.exe is located under : "C:\Programme\CodeBlocks\MinGW\bin" and the paths are all set in Code::Blocks.

The source of the program I try to compile (maybe it's my fault):

Code
#include <windows.h>
#include "detours.h"
//#pragma comment(lib, "detours.lib")

int (__stdcall *InsertDateTime)(int x);
int (__stdcall *SetTitle)(LPCWSTR lpString1);

int MyInsertDateTime(int x)
{
MessageBox(NULL, "InsertDateTime Just Got Called", "InsertDateTime", MB_OK);
return InsertDateTime(x);
}


int MySetTitle (LPCWSTR lpString1)
{
return SetTitle((LPCWSTR)L"Hooked");
}

BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
switch (ul_reason_for_call) //Decide what to do
{
case DLL_PROCESS_ATTACH: //On dll attach
{
InsertDateTime = (int (__stdcall*)(int))DetourFunction((PBYTE)0x01006F10, (PBYTE)MyInsertDateTime);
SetTitle = (int (__stdcall *)(LPCWSTR))DetourFunction((PBYTE)0x01002A55, PBYTE(MySetTitle));
break;
}
case DLL_THREAD_ATTACH: //On thread attach
break;
case DLL_THREAD_DETACH: //On thread detach
break;
case DLL_PROCESS_DETACH: //On process detach
{
DetourRemove((PBYTE)0x1006F10, (PBYTE)InsertDateTime);
DetourRemove((PBYTE)0x01002A55, (PBYTE)MySetTitle);
break;
}
}
return 1;
}


It works when using the Microsoft Visual C++ 2008 Express Edition - Compiler though. I would be happy to see this fixed or getting help :)!

CracKPod
Title: Re: The 22 April 2008 build (5010) is out.
Post by: zortich on April 22, 2008, 08:21:47 pm
so litle bigs are fixed.
Is codeblocks dieng?
Title: Re: The 22 April 2008 build (5010) is out.
Post by: MortenMacFly on April 22, 2008, 08:45:43 pm
The source of the program I try to compile (maybe it's my fault):
You are trying to compile a project with Visual C++ compiler options with MinGW. This won't work. Either you fully port your project to the MinGW compiler suite (by removing invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!] options) or switch to the VC compiler.

And in fact that's not an error but just a warning: You are not using the compiler correctly. And that's what the compiler and thus C::b is telling you. ;-)
Title: Re: The 22 April 2008 build (5010) is out.
Post by: MortenMacFly on April 22, 2008, 08:47:14 pm
Is codeblocks dieng?
What a "cool" question. :? Well... don't we all die one day?! But probably it's just a regression thus C::B has not as many errors that needs to be fixed as in the past... right?! Just choose your option.
Title: Re: The 22 April 2008 build (5010) is out.
Post by: CracKPod on April 22, 2008, 08:53:20 pm
Oke I created a completely new project and now I get the following error:

Code

-------------- Build: Debug in Notepad Hook ---------------

Compiling: main.cpp
In file included from C:\Programme\CodeBlocks\Projects\Notepad Hook\main.cpp:2:
C:\Programme\CodeBlocks\Projects\Notepad Hook\detours.h:15: warning: ignoring #pragma comment
In file included from C:\Programme\CodeBlocks\Projects\Notepad Hook\main.cpp:2:
C:\Programme\CodeBlocks\Projects\Notepad Hook\detours.h:611:8: warning: extra tokens at end of #endif directive
Linking dynamic library: bin\Debug\Notepad Hook.dll
C:\Programme\CodeBlocks\MinGW\bin\ld.exe: cannot find -ldetours.lib
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 2 warnings

I guess it's my fault again, isn't it?... :lol:

"cannot find -ldetours.lib" well that's logically since there isn't any -ldetours.lib but a detours.lib... So probably Code::Blocks made an error there not placing a space betwenn -l and detours.lib? (-l detours.lib);

---

so litle bigs are fixed.
Is codeblocks dieng?

So you think Code::Blocks is "dieng" since there aren't enough bugs to fix?
Title: Re: The 22 April 2008 build (5010) is out.
Post by: jomeggs on April 22, 2008, 10:18:49 pm
so litle bigs are fixed. Is codeblocks dieng?

Yes, certainly! Recently we got the 8.02 release, that's an infallible sign for a dying software product. The steadily arriving nightly's are only ultimate winces. :lol: :lol: :lol: :lol: :lol:
Title: Re: The 22 April 2008 build (5010) is out.
Post by: orel on April 22, 2008, 10:20:57 pm
"cannot find -ldetours.lib" well that's logically since there isn't any -ldetours.lib but a detours.lib... So probably Code::Blocks made an error there not placing a space betwenn -l and detours.lib? (-l detours.lib);

Try to test/check/google a little bit more elsewhere before guessing CodeBlocks made an error.

Taken from ld man pages :
Code
-l library                adds the specified library to the list of libraries to be linked with. In searching
                           for libraries (for example, with -lfoo), each library directory is first searched for
                           the UNIX-style archive name (that is, libfoo.a) and then for the Windows-style
                           library name (that is, foo.lib) in each library directory.

Try giving only "detours" to the list of libraries to link with your project in the configuration.
Title: Re: The 22 April 2008 build (5010) is out.
Post by: pasgui on April 23, 2008, 02:36:54 am
Build for Ubuntu i386/amd64 can be found here (http://lgp203.free.fr/spip/spip.php?article1)

Best regards, pasgui
Title: Re: The 22 April 2008 build (5010) is out.
Post by: rhf on April 23, 2008, 04:38:37 am
so litle bigs are fixed.
Is codeblocks dieng?
To folks who don't actively follow these forums and see the hard work of the developers, the Berlioz data can be a little disquieting.  https://developer.berlios.de/projects/codeblocks/
   Bug Tracking ( 184 open bugs, 886 total )
   Features Feature Requests ( 227 open requests, 328 total )
   Patches Patch Manager ( 34 open patches, 510 total )
Title: Re: The 22 April 2008 build (5010) is out.
Post by: joubertdj on April 23, 2008, 08:56:08 am
so litle bigs are fixed.
Is codeblocks dieng?

"Truly, truly, I say to you, unless a grain of wheat falls into the earth and dies, it remains alone; but if it dies, it bears much fruit." - John 12:24

"You fool! That which you sow does not come to life unless it dies" - 1 Corinthians 15:36

In other words ... it did die ... and is now growing into what it needs to become ...
Title: Re: The 22 April 2008 build (5010) is out.
Post by: Xaviou on April 23, 2008, 12:31:19 pm
Ubuntu 7.04 to 7.10 Amd64 tar.gz archive (containing '.deb' installers builds with wx287) can be found here (http://www.esnips.com/web/CodeBlocks).
Title: Re: The 22 April 2008 build (5010) is out.
Post by: MortenMacFly on April 23, 2008, 08:16:27 pm
I guess it's my fault again, isn't it?... :lol:
Well - when I encounter such errors I my assumption is usually "It's all my fault"." And guess what: In 98% of the cases that is true. ;-)

But yes - In your case the compiler command is 100% correct. The MinGw (GCC) linker expects at the command line the following syntax:
-l[name_of_library]
Thus, no space needed (btw: you can always consult the manual for the GCC compiler suite for such questions).
So - in your case the linker is telling you that it can't find the library you are trying to link against. The solution is simple: Just add the directory where the library is to the linker search path's.

One hint of mine: Honestly: If such (simple) errors make you stop with your work it's probably wise to read a few sentences about compiler/linker command lines and errors in general. This will help you a lot, I promise.
Title: Re: The 22 April 2008 build (5010) is out.
Post by: Joerg on April 24, 2008, 09:09:13 am
Hi it's me again  :)

I was quite frustrated about the autorun problem.
It was my mistake of course using F9 instead of Ctrl-F9.
But I was also confused by the build button that
does more than just build!
I don't know if this behavior is intended but
I think its very misleading.
So maybe someone can have a look at this button.
I know this is not the right forum but I
posted under help too and didn't get any
neither there nor here.
Greets,
Joerg
Title: Re: The 22 April 2008 build (5010) is out.
Post by: stahta01 on April 24, 2008, 07:09:28 pm
Patch needed on SVN 5019, to compile on windows when not using PCH.
I needed to add an include of configmanager.h

Patch not needed someone added the include.

Tim S

Index: src/plugins/debuggergdb/gdb_commands.h
===================================================================
--- src/plugins/debuggergdb/gdb_commands.h   (revision 5019)
+++ src/plugins/debuggergdb/gdb_commands.h   (working copy)
@@ -31,6 +31,7 @@
 #include "threadsdlg.h"
 #include "gdb_tipwindow.h"
 #include "remotedebugging.h"
+#include "configmanager.h"
 
 namespace
 {