News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Compile Time Error

Started by puneet_m, August 06, 2007, 09:23:22 PM

Previous topic - Next topic

puneet_m

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

thomas

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

puneet_m

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

thomas

You need to link with the wxWidgets library too.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

puneet_m

I have linked with wxWidget library too. The library name is wxmsw28u_gcc_custom.dll.

Can you still see what the problem might be?

David Perfors

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
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

puneet_m

What should I specify in Project->Build Options->Selected Compiler?

As of now I have specified GCC compiler...

thomas

Quote from: mispunt on August 09, 2007, 02:46:42 PMBut all those things are set in the project files of codeblocks
What mispunt said.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

puneet_m

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

Biplab

Quote from: puneet_m on August 10, 2007, 07:52:40 PM
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.
Be a part of the solution, not a part of the problem.

puneet_m

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

dje

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