Author Topic: Compile Time Error  (Read 8515 times)

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Compile Time Error
« 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

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Compile Time Error
« Reply #1 on: August 07, 2007, 11:17:42 am »
You don't link with gdi32.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compile Time Error
« Reply #2 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

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Compile Time Error
« Reply #3 on: August 08, 2007, 10:50:45 am »
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."

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compile Time Error
« Reply #4 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?

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Re: Compile Time Error
« Reply #5 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
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compile Time Error
« Reply #6 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...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Compile Time Error
« Reply #7 on: August 10, 2007, 09:26:18 am »
But 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."

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compile Time Error
« Reply #8 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

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Compile Time Error
« Reply #9 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.
Be a part of the solution, not a part of the problem.

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Compile Time Error
« Reply #10 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

Offline dje

  • Lives here!
  • ****
  • Posts: 682
Re: Compile Time Error
« Reply #11 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