Comments (8)
I might be all wrong about this because you're clearly building on this branch. Maybe my dub is out of date (it's Feb 17 2015)?
If so feel free to close this and I'll figure out what I'm doing wrong.
from dgame.
Currently, I'm using the test directory only, so it could be my fault. I will change it to 'library'.
from dgame.
I believe 'library' could bring some trouble since Dgame isn't like other DUB packages; there is no src/Dgame path. If 'sourceLibrary' works better than 'library, I have to change the structure to src/Dgame.
from dgame.
Thanks, I'll give it a try.
I think sourceLibrary
should work OK because you have "sourcePaths":["."]
in your dub.json.
from dgame.
OK, the dub.json bug is now fixed but as a library target it fails because it picks up main() in test/main.d and I get this error.
../../../../.dub/packages/dgame-0.5.0/test/main.d(35): Error: only one main allowed
The fix is trivial and requires changing the "excludedSourceFiles" field in the "lib" target to:
"excludedSourceFiles": ["main.d", "test/main.d"]
.
Whenever you around to this is cool, 0.5.0 is WIP after all.
from dgame.
After tomorrow I have plenty of time. ;) But I will fix this small bug in the next hour.
How do you import Dgame if you build it as a library?
from dgame.
Ah, sorry my bad. When I look now I see that I had Dgame building as a sourceLibrary.
WIth the last commit and Dgame targetType as sourceLibrary I can compile and run the "tut.d" as a completely separate dub project.
(I get a run time error from Derelict about invalid fonts but that is unrelated to this issue)
Build with Dgame as a "library" target I get the import path error:
source/testdgame.d(4): Error: module Window is in file 'Dgame/Window/Window.d' which cannot be read
Sorry for the confusion. I'll also look into dub and how to get Dgame prefix to import paths for a library target. If I stumble across anything I'll let you know .
from dgame.
The whole test folder will disappear, so it's only a temporal fix. ;) Don't worry.
source/testdgame.d(4): Error: module Window is in file 'Dgame/Window/Window.d' which cannot be read
It's because Dgame is not built like DUB wants to. Maybe I should change it to 'source/Dgame'. DUB will automatically accept source as import path and the error should disappear.
from dgame.
Related Issues (20)
- Iterating over SpriteSheet starts at index 1 and ends at index 0 HOT 13
- small issue on page HOT 2
- [Feature Request] A Window.draw overload with an offset HOT 4
- Dgame Does not render on multiple windows HOT 3
- Make Rect a template to allow for floating point HOT 1
- Necessary code doesn't execute when compiling in release mode HOT 3
- Shape color is being changed by unrelated objects HOT 5
- TTF_Init is not being called, formatting Text always errors "Font Invalid" HOT 5
- StopWatch Divide by 0 when trying to fill frame_ms HOT 1
- DerelictGL3 not able to find symbol ( glGetnTexImage ) HOT 3
- Window.wait Timeout is milliseconds, not seconds. HOT 1
- Collision detection HOT 4
- Wrong links in README.md? HOT 1
- Dgame crashing HOT 6
- Is this project still alive ? Couple bugs I ran into. HOT 8
- What about adding more built in colors? Like 400 plus . Color Enhancement idea . HOT 8
- Rect methods questions ? Add new method clamp ? HOT 1
- `object.Error@(0): Access Violation` on `DMD32` HOT 7
- D program quits unexpectedly when using Text HOT 11
- Text colors are wrong HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dgame.