Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Using VC Toolkit to compile C::B
Cyberax:
I've finally managed to compile C::B using VC 2003 Toolkit (actually, I used VisualStudio 2003) in Unicode. Now it can be debugged using a superb VisualStudio debugger :)
During this process I've fixed numerous incompatibilities. Here are the major ones:
* 1. VC's preprocessor doesn't support variable number of parameters in macroses. So I had to correct CFG_READ and CFG_WRITE.
* 2. VC's preprocessor doesn't understand such constructs:
--- Code: ---SomeFunc(_("Text, text, text"
"text continues"
"end of text"));
--- End code ---
It rewrote all such occurrences to:
--- Code: ---SomeFunc(_("Text, text, text"
_T("text continues")
_T("end of text")));
--- End code ---
[li]3. I've added correct class exports, so SDK can now be built as a DLL with VC.[/li]
[/list]
You can download patched codeblocks from: http://scb.udsu.ru/~cyberax/codeblocks_vc.zip
mandrav:
Thanks for the effort.
Where's that patch again? ;)
grv575:
For #2, are you sure they are equivalent?
Also, you sure
--- Code: ---SomeFunc(_("Text, text, text" \
"text continues" \
"end of text"));
--- End code ---
doesn't work?
sanjivg:
Also it would be good if you could come up with some write up to build c::b using Visual Studio.
I am also facing problems while debugging c::b using gdb on windows. i am not able to debug plugins, even after following the suggested method of putting a breakpoint in ScanforPlugins and then by adding the symbol file.
Thanks
Sanjiv
Cyberax:
--- Quote from: grv575 on September 25, 2005, 08:45:19 pm ---For #2, are you sure they are equivalent?
--- End quote ---
Yes, I am sure.
--- Quote ---Also, you sure
--- Code: ---SomeFunc(_("Text, text, text" \
"text continues" \
"end of text"));
--- End code ---
doesn't work?
--- End quote ---
Yes. In Unicode mode '_("Text")' is exapanded to 'L"Text"', so this code will look like:
--- Quote ---SomeFunc(L"Text, text, text" \
"text continues" \
"end of text");
--- End quote ---
This is not a Standard-compliant code and VC7.1 will not compile it ("error C2308: concatenating mismatched wide strings").
Just for reference, ISO/IEC 14882:2003(E) 2.13.4.3:
--- Quote ---If a narrow string literal token is adjacent to a wide string literal token, the behavior is
undefined.
--- End quote ---
Navigation
[0] Message Index
[#] Next page
Go to full version