FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

building a gld program, missing libs

 
Post new topic   Reply to topic     Forum Index -> Schooner
View previous topic :: View next topic  
Author Message
Lutger



Joined: 25 May 2006
Posts: 91

PostPosted: Sun Nov 19, 2006 9:15 am    Post subject: building a gld program, missing libs Reply with quote

I'd like to use gld instead of glfw but got stuck in the build process somewhere. It seems I am missing a couple of windows import libs according to OPTLINK: mpr.lib, imm32.lib, lz32.lib and rpcns4.lib.

I couldn't find these libs anywhere, did I do something wrong or perhaps these can be build / downloaded somewhere?

Thank you for providing this code, I like glfw. Very Happy

EDIT: I am so dumb excuse me, I actually managed to build my app without noticing it. Embarassed Those missing libs were just 'warnings' by optlink, I figure they are not actually needed.
Back to top
View user's profile Send private message
Bradley Smith



Joined: 20 Jun 2006
Posts: 60

PostPosted: Sun Nov 19, 2006 11:24 pm    Post subject: Reply with quote

You're right. Those libraries are not be needed. I don't know why linking would give a warning about them. I don't see that when building the example programs.
Back to top
View user's profile Send private message
un_guru



Joined: 14 Sep 2005
Posts: 32

PostPosted: Mon Nov 20, 2006 12:53 am    Post subject: Reply with quote

Bradley Smith wrote:
You're right. Those libraries are not be needed. I don't know why linking would give a warning about them. I don't see that when building the example programs.

The linker can't find those files, that is the only problem. You probably have them, but we don't Smile
The download package works fine, but the 15 revision doesn't (on windows).
Back to top
View user's profile Send private message
Lutger



Joined: 25 May 2006
Posts: 91

PostPosted: Mon Nov 20, 2006 8:32 am    Post subject: Reply with quote

Well then it just works that's the important thing for me. All I have to do is a simple search and replace for glfw->gld and my code will be ported and completely native D!

The warnings must come from pragma(lib, "foobar.lib") statements in the windows headers.
I checked with bud -modules and for example according to bud win32.winnetwk is included in the dependency list. winnetwk.d has a pragma(lib, "mpr.lib") statement.

Could it be that more is linked than is needed? The triangle example compiles (-release -O -inline) to about 230Kb which looks a bit much for glfw. D executables did get a little bigger though since the last one or two releases, or is that just me?
Back to top
View user's profile Send private message
Bradley Smith



Joined: 20 Jun 2006
Posts: 60

PostPosted: Tue Nov 21, 2006 1:06 am    Post subject: Reply with quote

un_guru wrote:
The linker can't find those files, that is the only problem. You probably have them, but we don't
The download package works fine, but the 15 revision doesn't (on windows).


Version 2 is a release, and is revision 11 in subversion. Revision 15 is under development and therefore in a state of flux.

Lutger wrote:
Could it be that more is linked than is needed? The triangle example compiles (-release -O -inline) to about 230Kb which looks a bit much for glfw. D executables did get a little bigger though since the last one or two releases, or is that just me?


You're probably right about it linking in more than is needed. I am altering the project to use libraries and D header (.di) files. Doing so appears to have reduced the size of the executables. Currently this is what I've found for the sizes of the triangle example.

158K D triangle.exe using gld version 2
116K D triangle.exe and glfw.dll
113K D triangle.exe using gld (via libraries)
109K C++ triangle.exe and glfw.dll
80K C++ triangle.exe using glfw

I don't think the current size of 113K for D is excessively larger than 80K for C++. Even a Hello World program in D can be 15K larger than the same program in C++. Generally, I've found D executables to be larger than C++, but depend upon fewer external runtime libraries.

The above was using DMD 0.174, Visual C++ 8, and GLFW 2.5. All D code build with -O -inline -release options.
Back to top
View user's profile Send private message
Bradley Smith



Joined: 20 Jun 2006
Posts: 60

PostPosted: Wed Nov 22, 2006 1:22 am    Post subject: Reply with quote

After investigating further, I see that the large size of the executable occurs on Linux. However, this is caused by DMD, not by the gld library. A Hello World program compiled by DMD on Linux will be about 220K (unstripped). The triangle executable is 317K.
Back to top
View user's profile Send private message
Lutger



Joined: 25 May 2006
Posts: 91

PostPosted: Fri Dec 22, 2006 11:46 am    Post subject: Reply with quote

I've found that some large executables were due to derelict, not gld. With using static libraries, it seems that DerelictGL adds almost 200kb to the executable beyond what the other gl bindings do.

I like the static library style building, it reduces build times to near instant.

EDIT: I've found some posts in the newsgroup that DMD is not very good at stripping unused symbols, GDC may do a better job at this.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Schooner All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group