Workflow in windows #3025
Replies: 3 comments 6 replies
-
@chriscamacho Do you mean this Chipmunk? It looks like you should be able to build static Chipmunk files just like you can do the same (and recommended) for raylib, and then let the (Visual Studio VC/C++ or maybe gcc) linker optimize what actually must be included into your executable. The wrinkle in Chipmunk is that it expects any program that uses it must be compiled as C++ even though the API bindings are extern "C" (no name mangling). The peculiarity of the C++ condition is that operator overloading is relied on, and maybe other features. This is potentially messy with regard to runtimes and malloc dependencies. :). There are also Win32 and Visual Studio dependencies that have not been kept current since VS 2017. Having said all of that, I think you can just build all of the Chipmunk modules without CMake, cache the results and have those intermediates drawn into the linking. I never do anything but x64 builds using Visual Studio build tools (now at 17.5.x) that way, so this advice may not be helpful for you. (You want compiling to be into modes where link-time optimization does not include anything that your code does not depend on, directly or indirectly. Makes for tidy executables.) |
Beta Was this translation helpful? Give feedback.
-
largely speaking the language is not an issue where the library has a C
API...
by preference I'd rather use a static library .a (or .lib depending on
compiler) so all dependencies are part of the executable, the compiler is
more than capable of dropping code that can't be reached... (optimisation)
I'd rather compile with pre-compiled static libraries as I have no need to
modify the code.
I've had more issues from libtmx (only on Windows) as it drags in libxml2
which in turn drags in other stuff...
I've also had issues with compiling Raylib too (which I haven't encountered
before when compiling on Windows) specifically the GLFW null platform issue.
…On Sun, 23 Apr 2023 at 16:56, Dennis E. Hamilton ***@***.***> wrote:
@chriscamacho <https://github.com/chriscamacho> Do you mean this Chipmunk
<https://github.com/slembcke/Chipmunk2D>?
It looks like you should be able to build static Chipmunk files just like
you can do the same (and recommended) for raylib, and then let the (Visual
Studio VC/C++ or maybe gcc) linker optimize what actually must be included
into your executable.
The wrinkle in Chipmunk is that it expects any program that uses it must
be compiled as C++ even though the API bindings are extern "C" (no name
mangling). The peculiarity of the C++ condition is that operator
overloading is relied on, and maybe other features. This is potentially
messy with regard to runtimes and malloc dependencies. :).
There are also Win32 and Visual Studio dependencies that have not been
kept current since VS 2017.
Having said all of that, I think you can just build all of the Chipmunk
modules without CMake, cache the results and have those intermediates drawn
into the linking. I never do anything but x64 builds using Visual Studio
build tools (now at 17.5.x) that way, so this advice may not be helpful for
you. (You want compiling to be into modes where link-time optimization does
not include anything that your code does not depend on, directly or
indirectly. Makes for tidy executables.)
—
Reply to this email directly, view it on GitHub
<#3025 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFO4SMINXNXDJ62QGX4K3DXCVGMLANCNFSM6AAAAAAXILYMEA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
--
blog bedroomcoders.co.uk <http://bedroomcoders.co.uk>
Free source code and tutorials!
Disclaimer:
By sending an email to ANY of my addresses you are agreeing that:
1. I am by definition, "the intended recipient"
2. All information in the email is mine to do with as I see fit and make
such financial profit, political mileage, or good joke as it lends itself
to. In particular, I may quote it where I please.
3. I may take the contents as representing the views of your company.
4. This overrides any disclaimer or statement of confidentiality that
may be included on your message.
|
Beta Was this translation helpful? Give feedback.
-
well I'm a lot closer this try.... 1>raylib.lib(rcore.obj) : error LNK2019: unresolved external symbol timeBeginPeriod referenced in function InitTimer despite having winmm.lib as an additional dependency this is linking to raylib compiled with the vc2022 solution in the raylib project folder - the examples compile and work.... |
Beta Was this translation helpful? Give feedback.
-
My daily driver is (Void) Linux, and I never appreciated the various issues involved in Windows that in Linux you just never seem to come across...
I have a project using Raylib, Chipmunk, libtmx (this pulls in libxml2, zlib etc)
I had to use msys2 to compile chipmunk and libtmx as both require cmake which isn't in w64devkit, but joy of joys it looks like the compilers aren't compatible.
I did try compiling Raylib with msys2 but then the resulting executable that glfw complains it can't open a display on a null platform.
Can anyone suggest a workflow where I can compile Raylib, Chipmunk and libtmx (ideally all statically) into a single executable...
Beta Was this translation helpful? Give feedback.
All reactions