News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

building CodeBlocks with M$ VC++ Toolkit 2003

Started by tiwag, May 16, 2005, 05:54:59 PM

Previous topic - Next topic

tiwag

has anybody tried to convert or already converted the
CodeBlocks.cbp (wxWidgets 2.4.2 build) project file
to use it with the M$ VC++ Toolkit 2003 ?

GCC is a little bit "slow" ... so i would prefer to use VC7

if nobody has done it already but somebody is interested to do
it with me, please post here.

thanks
--tiwag

CrazyAbbot

I've been trying, but its giving me some wierd compile errors, and sometimes it gets stuck on linking tinyxml.lib.  although i can get it to work fine in visual studio.


however VC++ breaks on sdk\managedthread.cpp
'__ctor' is not a member of wxThread.  line21

It dosn't like the SANITY_CHECK() macro much either.

tiwag

Quote from: CrazyAbbotI've been trying, but its giving me some wierd compile errors, and sometimes it gets stuck on linking tinyxml.lib.  although i can get it to work fine in visual studio.


however VC++ breaks on sdk\managedthread.cpp
'__ctor' is not a member of wxThread.  line21

It dosn't like the SANITY_CHECK() macro much either.

hehe

the same as here by me: error C2039

Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : D:\cpp\_projects\Codeblocks\CodeBlocks_src_vc\
--------------------------------------------------------------------------------
Switching to target: sdk
...
sdk\managedthread.cpp(20) : error C2039: '__ctor': Ist kein Element von 'wxThread'
       D:\wx242\include\wx\thread.h(423): Siehe Deklaration von 'wxThread'
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings


@crazyAbbot: Have you managed to build *any* plugin dll with VC ?
can you please send me a visual studio project file, which is working by you ?

thanks
--tiwag

CrazyAbbot

I havn't been able to get it working at all.  Since the entire project was written using GCC then it's to be expected that visual studio won't like it.  the source will probably need to be fixed with some #ifdefs.  however i don't understand the source code well enough to fix it

tiwag

Quote from: CrazyAbbotI've been trying, but its giving me some wierd compile errors, and sometimes it gets stuck on linking tinyxml.lib.
although i can get it to work fine in visual studio.
....

aahh, i thought you meant the hole project, not only the single target
sorry for misunderstanding

tiwag

rickg22

tiwag: I'm the one who put those SANITY_CHECK() macros. They're defined in the sanitycheck.h file. No, I didn't test them with other compilers, so If you could find a way to fix them.... :)

The sanity checks are required to prevent C::B from crashing under certain conditions. (Some events are processed recursively, and this won't be changed unless most ppl vote for it after 1.0-FINAL is released)

CrazyAbbot

The Sanity Check macro isn't causing the compile to break. however there are many times when you call the macro with no parameters, which causes the compiler to generate a warning.  

It's the managedthread.cpp which causes things to snap.
I havn't had much time to look at it right now because of university etc.  
any clues as to why it's doing that?

rickg22

Apparently the offending part is:

ManagedThread::ManagedThread(bool* abortflag) :
wxThread::wxThread(wxTHREAD_JOINABLE),
m_pAbort(abortflag)

It's in the constructor part. What I don't get is, how does this thing tell me that the constructor "wxThread::wxThread(wxTHREAD_JOINABLE)" isn't part of wxThread?

Hmmm maybe it's got to do with not having a default constructor. But this is the only way that I could derive from wxThread, since the thread type variable is private  :x

rickg22

Guys I'm thinking. Maybe we should ask about this particular problem in the wxWidgets forums? Maybe someone could give us a hand.

Urxae

Hey, I was wondering, why is that second line wxThread::wxThread(wxTHREAD_JOINABLE), instead of just wxThread(wxTHREAD_JOINABLE),?

Normally you only need the name of the class in an initializer list, that you're calling the constructor is sort of implied ;)

rickg22

You do? :oops: Oh man, I guess I need to fix that (but i'm at work now). Can somebody change this line of code and try to compile with VC++ toolkit, to see if it works now?

Urxae

Sorry, can't help you on that one, I just have MinGW here...

rickg22

Oh, well in the meantime you can remove that "wxThread::" part in the constructor and see if it compiles ok :)

rickg22

OK guys i removed the "wxThread::" in the constructor. Mind checking if it compiles now?

CrazyAbbot

Ah yep that fixed that problem.  There are a few other issues.  I'll see if i can fix them

EDIT:

What is libwxxrc and libstc?

how are they made?