News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Compiling C::B using Msys2

Started by alle_meije, August 19, 2015, 01:47:51 PM

Previous topic - Next topic

alle_meije

Scouring all previous posts and manuals for options, I used this for building wxWidgets

configure --prefix=/mingw64 \
          --enable-compat28 --enable-xrc       --enable-shared     --enable-monolithic --disable-debug \
          --enable-unicode  --enable-vendor=cb --disable-universal --enable-tooltips   --enable-dnd \
          --with-opengl \
          CFLAGS='-fno-keep-inline-dllexport' \
          CXXFLAGS='-fno-keep-inline-dllexport'


But the same DLL-related things are still causing problems even with all those options.

I have tried

  cd ../wxWidgets-dev/
  make distclean
  configure --prefix=/mingw64 \
            --disable-shared --enable-static     --enable-compat28   --enable-xrc      --enable-monolithic --disable-debug \
            --enable-unicode --enable-vendor=cb  --disable-universal --enable-tooltips --enable-dnd \
            --with-opengl
  updatedb & make && make install
  cd ../codeblocks-dev/
  ./bootstrap
  ./configure --with-wx-config=`which wx-config`
  make


To see if it would work with wxWidgets compiled as a static library, but it still stops at the Annoying Dialog (same place) complaining about static members.

Out of ideas.

stahta01

I am trying to get Code::Blocks to build using MSys2 MinGW64.
It is now obvious that the exchndl DLL will need ported to MSys2; this is NOT something I plan to do.
I believe the exchndl DLL is made from drmingw sourcecode https://github.com/jrfonseca/drmingw
I plan to just fix the other items; and, then wait for someone else to port the exchndl DLL.
Or, at least wait till I learn enough of MSys2 to think it is possible for me to do it myself.

My Git location that I plan to upload the work in a few weeks
https://github.com/stahta01/msys2_codeblocks

My repo I am using to test changes; I am still learning how to use Git correctly.
I am doing a lot of forced pushes on this repo; to correct mistakes.
( I know configure/make even less than I know Git)
https://github.com/stahta01/codeblocks_windows

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

scarphin

There is a 64-bit version of exchndl.dll in cb repo, doesn't that work for you? I use it for my 64-bit builds.

Btw, I've ported all the required project, workspace and update files to 64-bit wx2.8 for my own usage, I can pack them and upload them somewhere if that helps.

stahta01

#18
Quote from: scarphin on September 19, 2015, 10:42:49 AM
There is a 64-bit version of exchndl.dll in cb repo, doesn't that work for you? I use it for my 64-bit builds.

Btw, I've ported all the required project, workspace and update files to 64-bit wx2.8 for my own usage, I can pack them and upload them somewhere if that helps.

MSys2 does NOT use MINGW64 built in startup code for its internal built apps.
So, I am guessing the 64-bit version of exchndl.dll in cb repo will NOT work as a native MSys2 app.
My first idea was to just create a Windows 64 bit apps modified to work with MSys2 and that way the
64-bit version of exchndl.dll in cb repo should work.

I just wanted to get the configure/make method of building to work under MSys2 and in my view
that will require 64-bit version of exchndl.dll compiled to work as native MSys2 dll.
The work to do this correctly using the correct MSys2 packaging is way beyond the effort I wish to put in.

But, I now need to decide how to fix the Squirrel libs for DLL export issues.
(I am trying to build the CB SDK without using the linker export all option; I think its a bad design choice.)
FYI: I figured out how to export the Mgr Template in case that is wanted by someone.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

scarphin


stahta01

#20
Quote from: scarphin on September 19, 2015, 11:27:03 PM
Ok, my bad.

No it was a good idea, I am trying to compile it right now using that way.
But, it is a bad idea in that it is very likely the crash reporting routine will crash instead of reporting a error correctly.

Found out I will need to port the console runner to MSys2; and I think that is something within my knowledge and abilities.

I have an issue getting some core plugins to link because of tinyXML link errors; but, I decided to just ignore those plugins for now.
(The Compiler Plugin compiles without any errors; and, that is the most important plugin to me.)

I am hoping the starter of this thread will do the work of porting exchndl.dll to the MSys2 environment.
If not, I plan to try my changes under CygWin64 and see if they work there.

Edit: Found this package mingw-w64-x86_64-drmingw-0.7.4-2; so, I do NOT need to worry about porting drmingw to MSys2's mingw-w64-x86_64. Note: I am NOT certain if porting is the right word; might just be a minor recompile with linking to the correct object files.
But, I am a newbie on using MSys2 and did NOT wish to do something that might be risky.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

alle_meije

#21
Sorry for letting this thread get old. Must admit these names mean nothing to me.
But still, I'll give it a go if it means being able to have C::B in Msys2!

It looks like a 64-bit version was compiled before?
http://forums.next.codeblocks.org/index.php/topic,18902.msg129510.html#msg129510

alle_meije

I have compiled https://github.com/jrfonseca/drmingw in Msys2, which includes a exchndl DLL.

In Msys2 64-bit I did

git clone https://github.com/jrfonseca/drmingw.git
cd drmingw/
mkdir build
cd build
cmake .. -G "MSYS Makefiles"
make


which produces a DLL file bin/exchndl.dll that I'm more than happy to share.

stahta01

@ alle_meije:
I am building CB Under MSys2 using the DrMinGW and wxWidgets Msys2's MinGW64 packages.

Still have NOT fixed all the bugs; but, I can build CB using Configure/Make method.
I have NOT spent enough time to see if the resulting Code::Blocks is useful for doing anything.

I have changed to trying to build CB using CB Projects for now; then, I plan to merge the two methods.
After, that I plan to test the resulting binaries for usefulness.

I have NO idea what would be the proper location in MSYS2 to store the CB config file; do you have a suggestion?

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

I have decided to stop work on trying to build Code::Blocks under MSys2 using configure/make decided it was NOT the real problem.

Decided the real problem is making the normal Windows built binary to work better with the Compiler and Libraries from an MSys2 installation.

Likely need to add use of the command "cygpath" in the compiler.

This means I would likely need to edit the Cygwin GCC Compiler code to use it.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]