Author Topic: building CodeBlocks with M$ VC++ Toolkit 2003  (Read 28034 times)

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
building CodeBlocks with M$ VC++ Toolkit 2003
« on: May 16, 2005, 05:54:59 pm »
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

Offline CrazyAbbot

  • Multiple posting newcomer
  • *
  • Posts: 14
    • http://
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #1 on: May 18, 2005, 01:25:53 pm »
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.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #2 on: May 19, 2005, 12:33:26 pm »
Quote from: 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.


hehe

the same as here by me: error C2039

Code: [Select]
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

Offline CrazyAbbot

  • Multiple posting newcomer
  • *
  • Posts: 14
    • http://
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #3 on: May 20, 2005, 10:34:13 am »
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

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #4 on: May 20, 2005, 12:20:12 pm »
Quote from: 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.
....


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

tiwag

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #5 on: June 02, 2005, 07:29:05 pm »
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)

Offline CrazyAbbot

  • Multiple posting newcomer
  • *
  • Posts: 14
    • http://
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #6 on: June 04, 2005, 02:22:22 pm »
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?

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #7 on: June 04, 2005, 04:20:09 pm »
Apparently the offending part is:
Code: [Select]

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

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #8 on: June 08, 2005, 06:37:40 pm »
Guys I'm thinking. Maybe we should ask about this particular problem in the wxWidgets forums? Maybe someone could give us a hand.

Offline Urxae

  • Regular
  • ***
  • Posts: 376
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #9 on: June 08, 2005, 07:04:20 pm »
Hey, I was wondering, why is that second line
Code: [Select]
wxThread::wxThread(wxTHREAD_JOINABLE), instead of just
Code: [Select]
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 ;)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #10 on: June 08, 2005, 07:42:37 pm »
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?

Offline Urxae

  • Regular
  • ***
  • Posts: 376
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #11 on: June 08, 2005, 09:09:21 pm »
Sorry, can't help you on that one, I just have MinGW here...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #12 on: June 08, 2005, 09:39:10 pm »
Oh, well in the meantime you can remove that "wxThread::" part in the constructor and see if it compiles ok :)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #13 on: June 11, 2005, 06:23:34 pm »
OK guys i removed the "wxThread::" in the constructor. Mind checking if it compiles now?

Offline CrazyAbbot

  • Multiple posting newcomer
  • *
  • Posts: 14
    • http://
building CodeBlocks with M$ VC++ Toolkit 2003
« Reply #14 on: June 15, 2005, 12:50:53 pm »
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?