Jump to content

Engine static lib


Josh
 Share

Recommended Posts

Actually you shouldn't expose .o, .a or .lib to the user at all. Let everyone use .dll only (and .so on Linux, and .DyLib on Mac of course), then it's cross-language compatible, and of course also cross-compiler and cross-platform compatible.

 

Don't make the same mistake as you did with bmx, when you gave them a mod file; they should have used a .dll also. That would have saved you lots of time which you spent on fixing missing things and differences in the dll and mod.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

But then you can't have a static build! Would be nice to have the choice to statically or dynamically link if it's not going to cause Josh too many problems maintaining it.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

Static builds are useless, they only need additional resources from the OS to handle the huge exe file size. Besides, then you can't update your game with the real changes, but always need to download a 4GB (or slightly smaller) exe.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Well if you really are about making static exes, then you need to include all the Windows DLLs too! Why make an exception? :o

How often have we seen that a user doesn't have the glut dlls, openal dlls, correct version of some directx dlls, etc....

And since youre making a static exe, you need also all possible hardware dlls there, unless you want to maintain 1000 different static exes.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

This is the natural inflation in Lumoojaworld :o Joking aside, it's nice to have the choice, by the time lots of other third party code has been included you can end up with a lot of DLLs.

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

.lib would be great i assume -

however, that bears another question (iam self learning e.g. not in school) - who would suggest bloodshed using Mingw/GCC 3.4.2 over Ms-EE version(s)? And - is there any differance at all, in terms of which (windows) dlls will be included ?

Iirc missing dx dll`s are allways debug builds from the SDK (which would need to be provided) and missing windows dll`s are from the windows SDK (if one is using those) ?! Sorry if i miss the point.

AMD 64 X2 Dual 5k - 4GB - XFX GForce9800GT - nv196.21 - WinXP Sp3

zBrush4R2 - Silo2Pro - Unwrap3DPro - Gile - MaPZone2.5

 

adv_banner-april2012_720x150_tex01.png

 

Xxploration FPS in progress ...

Link to comment
Share on other sites

I'm a bit confused because it seems GCC .lib files are not the same as MS .lib files. Am I to understand there is no standard static library format for C++?

 

Can the MS compiler load .a or .o files?

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Can the MS compiler load .a or .o files?

 

Rather depends if you can make Visual Studio create executables for other platforms... I've not seen a way to do that yet (But watch it be just one small option in the project properties :P )

 

If that can't be done, I don't see they would include the ability to read any static lib file format other than their own.

 

Really the question would be "Which compiler would you be most likely to use."

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

What is the actual advantage to doing this? I don't fully understand the difference but it sounds like a lot of work to simply avoid having a small amount of DLLs in the root directory of the game.

Programmer, Modeller

Intel Core i7 930 @ 3.5GHz | GeForce 480 GTX | 6GB DDR3 RAM | Windows 7 Premium x64

Visual Studio 2008 | Photoshop CS3 | Maya 2009

Website: http://srichnet.info

Link to comment
Share on other sites

You don't even need now any other files than game.exe in the root directory of the game. I have a structure like this in my game. Game.exe can use chdir() to set data as current directory, and then launch ..\bin\core.exe with WinExec():

game.exe
|---bin/
|   |---core.exe
|   |---engine.dll
|   |---newton.dll
|
|---data/
   |---shaders.pak
   |---scripts/
   |---terrain/
   |---maps/
   |---vegetation/

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...