Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Build CodeBlocks using Microsoft Visual C++

<< < (10/10)

oBFusCATed:
Because you've not build it correctly, most probably :)
Or someone has done something non portable.

BTW: I'm for enabling multiple compilers, because this makes the code more robust and more portable (even with the mad vc++)

Biplab:

--- Quote from: MortenMacFly on April 07, 2011, 06:31:20 am ---
--- Quote from: Biplab on April 07, 2011, 02:23:09 am ---If the direction is not to include such patches to trunk then it is not necessary to create a branch and then abandon it later. I'd rather keep my local copy in sync and dump the whole patched source somewhere in the web. :)

--- End quote ---
I didn't mean to abandon. Its easy to keep the branch in sync with trunk. We did this so often in the past and have two active branches that do so just fine. It's an experiment in the end, needed for a special purpose from time-to-time. The main stream development has to be in MinGW/GCC.

So, whenever you need the branch make it in sync with trunk and use it. These are 3 mouse clicks in my SVN software. And once stabilised you wouldn't even cause conflicts as there won't be much changes. And if we come to design guidelines (e.g. never do something like:

--- Code: ---_("text....\n"
   "more text...")

--- End code ---
)
...which we apply in trunk the differences will be minimised.

--- End quote ---

If we have too many branches I believe we will end up in merge conflict while keeping them in sync. And we also need somebody to maintain it. Using #ifdef is much easier than than doing a merge every now & then and most importantly it will not touch officially supported code. Anyway it's a personal preference.


--- Quote from: MortenMacFly on April 07, 2011, 06:31:20 am ---Why do you believe it would be better to

--- Quote from: Biplab on April 07, 2011, 02:23:09 am ---dump the whole patched source somewhere in the web. :)

--- End quote ---
then??? It will make it way harder to handle.

--- End quote ---

Interested ones can retrieve it easily. If we don't care about VC compatibility then officially there is no need to manage it. 

killerbot:
I also favor to be able to run the code with different compilers. But I think we should intend to write as much portable code as possible. The platform dependencies and non portable parts for us should be in the wxwidgets parts.

One place that already comes to mind where to nasty ifdefs will be needed is the declspec shit in order to export/import shared libraries.

That is basically ifdef else ... to define in the end one macro, and then we put that macro in front of the classes/functions we want to export.
That mumbo jumbo ifdef else could be put in a dedicated header in order not to repeat this all the time in every class who wants to export stuff.
I guess this already kind of occurs in sdk.h (should check).

Hmmmmmm, just realized we should already have this since MinGW is also doing this stuff, dunno if gcc uses the same syntax on windows and linux ?

Could maybe someone list other potential changes (so not just giving a patch), a nice list. That way we can nicely investigate/debate on the gain we get or the price we have to pay.

But I assume in 99% of the code we shouldn't do anything, code should be as portable as possible (as said wxwidgets is the one doing the dirty portability work for us).

Loaden:
EDIT: fix build error
V12: Change to ANSI build (Compatible with xgettext)

--- Quote ---nmake -f makefile.vc CPPFLAGS=/Os LDFLAGS="/MANIFEST:NO /OPT:REF /OPT:ICF" BUILD=debug SHARED=1 UNICODE=0 DEBUG_INFO=0 DEBUG_FLAG=1 MONOLITHIC=1 OFFICIAL_BUILD=1
nmake -f makefile.vc CPPFLAGS=/Os LDFLAGS="/MANIFEST:NO /OPT:REF /OPT:ICF" BUILD=release SHARED=1 UNICODE=0 DEBUG_INFO=0 DEBUG_FLAG=0 MONOLITHIC=1 OFFICIAL_BUILD=1
--- End quote ---
And I catch the crash using Visual Studio Debugger.

--- Quote --->   CodeBlocks.exe!sq_getprintfunc(SQVM * v)  Line 1255 + 0x3 bytes   C++
    CodeBlocks.exe!ScriptConsole::ScriptConsole(wxWindow * parent, int id)  Line 116 + 0xb bytes   C++
    CodeBlocks.exe!MainFrame::CreateIDE()  Line 701 + 0x37 bytes   C++
    CodeBlocks.exe!MainFrame::MainFrame(wxWindow * parent)  Line 553   C++
    CodeBlocks.exe!CodeBlocksApp::InitFrame()  Line 405 + 0x27 bytes   C++
    CodeBlocks.exe!CodeBlocksApp::OnInit()  Line 639 + 0xb bytes   C++
    wxmsw28d.dll!65e81ea7()    
    [Frames below may be incorrect and/or missing, no symbols loaded for wxmsw28d.dll]   
    wxmsw28d.dll!65ec6bcb()    
    MSVCR100D.dll!_getptd_noexit()  Line 500   C
    0018fb54()   

--- End quote ---
It's seems the crash occured in Squirrel.
Any comment are welcome!

Navigation

[0] Message Index

[*] Previous page

Go to full version