View previous topic :: View next topic |
Author |
Message |
scooterman
Joined: 06 Feb 2007 Posts: 10
|
Posted: Tue Feb 06, 2007 12:28 pm Post subject: Silly question |
|
|
Sorry, but I'm kinda new on D and I'm having a little trouble on how to link schooner with the build tool. I've tried with the -IPath to gld.lib but it didn't worked. Someone can give me a hand??
Thanks |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Bradley Smith
Joined: 20 Jun 2006 Posts: 60
|
Posted: Tue Feb 06, 2007 11:11 pm Post subject: |
|
|
Since I no longer use the build tool, I don't recall how get it to link libraries. Perhaps someone on the build forum can help.
Here is the command used to build the triangle example:
Code: | dmd gld.lib ..\gl\opengl32.lib ..\gl\glu32.lib ..\win32\win32.lib ..\win32\gdi32.lib ..\win32\winmm.lib -version=WindowsXP -Isource -I..\gl\imports -I..\win32\imports -Iimports -oftriangle.exe -L-L/exet:nt/su:windows:4.0 source\examples\triangle.d |
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Wed Feb 07, 2007 12:58 am Post subject: |
|
|
Bradley Smith wrote: | Since I no longer use the build tool, I don't recall how get it to link libraries. Perhaps someone on the build forum can help.
Here is the command used to build the triangle example:
Code: | dmd gld.lib ..\gl\opengl32.lib ..\gl\glu32.lib ..\win32\win32.lib ..\win32\gdi32.lib ..\win32\winmm.lib -version=WindowsXP -Isource -I..\gl\imports -I..\win32\imports -Iimports -oftriangle.exe -L-L/exet:nt/su:windows:4.0 source\examples\triangle.d |
|
If you do want to type in those library references each time, yo can use Bud to help ...
Create a Bud Response File (e.g glib.brf) and have it look like
Code: |
gld.lib
..\gl\opengl32.lib
..\gl\glu32.lib
-I..\gl\imports
|
and another for WinXP support (e.g. xp.brf)
Code: |
-version=WindowsXP
-I..\win32\imports
-L-L/exet:nt/su:windows:4.0
|
and if you use the stuff in the 'imports' path a lot, update the Bud configuration file to contain the line ...
So then when it comes to compiling your app ...
Code: |
bud myapp @glib @xp
|
_________________ --
Derek
skype name: derek.j.parnell |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
scooterman
Joined: 06 Feb 2007 Posts: 10
|
Posted: Wed Feb 07, 2007 10:39 am Post subject: |
|
|
Thanks, that worked perfectly. Another question:
I'm trying to create a simple test engine with gld, build it as lib, and then use the lib to create a independent program. But, when I try to import my engine on the main program, the compiler asks for gld import/lib. Is this correct?? |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Bradley Smith
Joined: 20 Jun 2006 Posts: 60
|
Posted: Wed Feb 07, 2007 3:11 pm Post subject: |
|
|
Unless you somehow combine the gld library with your engine library, the compiler will need both for the independent application. The gld imports should only be needed if the independent application calls gld directly, or if you use the your engine source to compile the independent application. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
accumen72
Joined: 04 Aug 2011 Posts: 2
|
Posted: Thu Aug 04, 2011 3:08 am Post subject: New Here |
|
|
I've got a silly question - is a schooner a sailboat? Thanks ![Smile](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|