Author Topic: [RESOLVED] Entry point not found error....  (Read 12760 times)

barbarello

  • Guest
[RESOLVED] Entry point not found error....
« on: January 06, 2006, 07:45:37 pm »
Hi all,

I'm working with
CODEBLOCKS 1.0RC2
wxWidgets 2.6.2


When i create a wxFrame, it's work (compilation and execution) correctly
But if i create a wxDialog, the compilation return 0 error but the execution of exe file send a messagebox :

The entry point  _ZN8wxDialog17MSWProcessMessageEP6tagMSG not found in lib wxmsw26_gcc_cb.dll

Here the code

#include <wx/wx.h>

class MainApp:public wxApp //declaration d'application - conteneur de fenêtre
{
public:
virtual bool OnInit();
};

class MainClass:public wxDialog //declaration de fenêtre -  conteneur des éléments de fenêtre
{
public:
MainClass(const wxString &title,const wxPoint &pos,const wxSize &size);
};

IMPLEMENT_APP(MainApp) //creation de l'instance de l'application

bool MainApp::OnInit()
{
MainClass *window=new MainClass("Titre de fenêtre",wxPoint(250,250),wxSize(350,250));
window->Show(true);
SetTopWindow(window);
return true;
}

MainClass::MainClass(const wxString &title,const wxPoint &pos,const wxSize &size)
:wxDialog((wxDialog*)NULL,-1,title,pos,size)
{
}



If anybody knows this problem.....

Thanks for helping
« Last Edit: January 06, 2006, 08:43:01 pm by barbarello »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Entry point not found error....
« Reply #1 on: January 06, 2006, 08:00:29 pm »
Linking against the wxWidgets dll coming with Code::Blocks (wxmsw26_gcc_cb.dll) is no good.

You should build wxWidgets yourself from source (or, if you don't want to do that, try the DevPak).
Building from sources takes a few minutes, but it is the recommended way.

Also, make sure that you use the correct compiler include paths.
If you compile with some arbitrary setup.h that is lying around somewhere in your path, then you won't get anywhere either - the libraries and headers (particularly setup.h) should always be from the same wxWidgets build.

Exception:
The above is not correct if you want to build a plugin. When building a plugin, you must link against the same wxWidgets library that was used to build Code::Blocks. In that case, download the SDK because you need the import libraries to be able to do so.
« Last Edit: January 06, 2006, 08:05:01 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

barbarello

  • Guest
Re: Entry point not found error....
« Reply #2 on: January 06, 2006, 08:17:56 pm »
Thanks

I've used this link http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29
to configure CODEBLOCKS for wxWIDGETS.

I've tried to recompile with options :  mingw32-make -f makefile.gcc USE_XRC=1 SHARED=0 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=cb  as i've found in this forum but I have now many errors during the compilation.

Excuses me, my English is very poor and i've not understood what you explain to me with SETUP.H file   :oops:

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Entry point not found error....
« Reply #3 on: January 06, 2006, 08:31:14 pm »
Hello,

May be this could help.

Michael

barbarello

  • Guest
Re: Entry point not found error....
« Reply #4 on: January 06, 2006, 08:42:31 pm »
OK it's resolved !!

As it's write on link : http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29

I put wxmsw26_gcc_cb.dll in C:\windows\system32
It works !

So after deleting it I add C:\<My_Folder_WXwidgets>\lib\codeblocks to compile -> compiler options -> programs -> additional paths

recompile...

It is OK

Thanks all for helping !

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: [RESOLVED] Entry point not found error....
« Reply #5 on: January 06, 2006, 08:46:33 pm »
Thomas: Mind copying that page of yours to the wiki?

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Entry point not found error....
« Reply #6 on: January 06, 2006, 09:18:36 pm »
I put wxmsw26_gcc_cb.dll in C:\windows\system32

I would advice not to put the wxmsw26_gcc_cb.dll in C:\windows\system32, but to add its path to the system path (environmental variable). IMHO this is a better solution.

Michael

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Entry point not found error....
« Reply #7 on: January 06, 2006, 11:33:13 pm »
I put wxmsw26_gcc_cb.dll in C:\windows\system32
It works !
Bad idea. This can lead to DLL hell. Even it if seems to work now, this can cause a problem at a later time, and you will not know what went wrong.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

barbarello

  • Guest
Re: [RESOLVED] Entry point not found error....
« Reply #8 on: January 07, 2006, 09:17:06 am »
yes i'm agree....and realize this yesterday :
Quote
So after deleting it I add C:\<My_Folder_WXwidgets>\lib\codeblocks to compile -> compiler options -> programs -> additional paths
recompile...
without the DLL, problem is the same

but i've spend more than a week to try to configure DEV-CPP, wxDEV-CPP and now CodeBlocks.
I need to work for my project and not on the tools.

Sure I will have the same problem problem later, and i imagine it's due to my compilation parameters.....
So....i will be back on this forum soon.... :)

Thanks all