Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: puneet_m on August 06, 2007, 09:23:22 pm

Title: Compile Time Error
Post by: puneet_m on August 06, 2007, 09:23:22 pm
When I try to compile codeBlock I get the following error:

undefined reference to CreateBitmap@20. I tried including the necessary header file Windows.h, but the error does not go.

Any ideas as to what is the error?

Thanks,
Puneet
Title: Re: Compile Time Error
Post by: thomas on August 07, 2007, 11:17:42 am
You don't link with gdi32.
Title: Re: Compile Time Error
Post by: puneet_m on August 07, 2007, 10:35:03 pm
Thanks for the reply. I linked with the gdit32, but now I am getting a different error:

undefined reference to '_imp__ZNK8wxStringllBeforeFirstEc'.

The error is because of the following line:
wxString option = token.BeforeFirst(':').

Thanks
Puneet
Title: Re: Compile Time Error
Post by: thomas on August 08, 2007, 10:50:45 am
You need to link with the wxWidgets library too.
Title: Re: Compile Time Error
Post by: puneet_m on August 08, 2007, 04:46:14 pm
I have linked with wxWidget library too. The library name is wxmsw28u_gcc_custom.dll.

Can you still see what the problem might be?
Title: Re: Compile Time Error
Post by: David Perfors on August 09, 2007, 02:46:42 pm
You should link against wxmsw28u.lib or libwxmsw28u.a (1st is for visual C++ 2nd is for mingw)

But all those things are set in the project files of codeblocks
Title: Re: Compile Time Error
Post by: puneet_m on August 09, 2007, 10:05:56 pm
What should I specify in Project->Build Options->Selected Compiler?

As of now I have specified GCC compiler...
Title: Re: Compile Time Error
Post by: thomas on August 10, 2007, 09:26:18 am
But all those things are set in the project files of codeblocks
What mispunt said.
Title: Re: Compile Time Error
Post by: puneet_m on August 10, 2007, 07:52:40 pm
In one of the manual the following statement is written --

You will be prompted to define the global variable $(#wx). Enter the location where you unpacked wxWidgets.

Hit the blue gear and lean back. Compilation may take 3-5 minutes, depending on the speed of your computer.

But I was not prompted to set the global variable. So can anyone highlight as to how to set the global variable.And how to execute the second statement

Thanks,
Puneet
Title: Re: Compile Time Error
Post by: Biplab on August 11, 2007, 09:40:32 am
But I was not prompted to set the global variable. So can anyone highlight as to how to set the global variable.And how to execute the second statement

Settings > Global variables.. and change the global variable.
Title: Re: Compile Time Error
Post by: puneet_m on August 13, 2007, 05:42:14 pm
Error says
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.4\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxxrc

I have compiled wxWidget using mingW, and it got compiled successfully. But it does not have any library like wxxrc.

Thanks,
Puneet
Title: Re: Compile Time Error
Post by: dje on August 13, 2007, 06:56:18 pm
wxxrc may be needed if you don't use a monolithic library.

If you use wxmsw28u_gcc_custom.dll, you should remove wxxrc from the linker libraries.

Dje