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

Problems linking to Library gl3n

 
Post new topic   Reply to topic     Forum Index -> Visual D
View previous topic :: View next topic  
Author Message
ParticlePeter



Joined: 19 Nov 2011
Posts: 49
Location: Germany

PostPosted: Mon Dec 05, 2011 7:54 am    Post subject: Problems linking to Library gl3n Reply with quote

Hi,

How would I set up my VisualD Project to link against this Library:
https://bitbucket.org/dav1d/gl3n

It comes with 4 d-Files, they are in the directory named gl3n. In the sourcefile there is a module definition directory.filename ( e.g. source util.d module gl3n.util ; )

The linker complaints that he cannot find the symbols within my exe which are defined in those files.
_________________
Cheers, searching for the Pivot of my Soul, PP
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Mon Dec 05, 2011 12:17 pm    Post subject: Reply with quote

You get link errors because the imported files are not automatically compiled, so they are missing for the link.

The proper way is to create a Visual D library project and add the 4 files to it, then add it as a build dependency to your executable project.

The simple way is to just drag them into your project, so they get compiled when you build the executable.

In both cases, you have to add the path to the gl3n folder to the import path setting in the project (or in the global settings if you plan to use it in most of your projects).
Back to top
View user's profile Send private message
ParticlePeter



Joined: 19 Nov 2011
Posts: 49
Location: Germany

PostPosted: Mon Dec 05, 2011 6:31 pm    Post subject: Reply with quote

THX very much,

the project approach worked immediately Smile
Have just one doubt, maybe you could clarify. I'm not sure, but I thing the library uses compile time code evaluation and string mixins. What happens if my code requires some additional generic function from that library, but the gl2n.lib is already build, and according to the compiler up to date ? Would the lib get rebuilded automatically ?
_________________
Cheers, searching for the Pivot of my Soul, PP
Back to top
View user's profile Send private message
sagitario



Joined: 03 Mar 2007
Posts: 292

PostPosted: Tue Dec 06, 2011 1:25 am    Post subject: Reply with quote

Code for instantiated templates and mixins is generated into the object files of the modules that use the templates or mixins, not the library. So you don't need to worry about it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Visual D 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