View previous topic :: View next topic |
Author |
Message |
Boscop
Joined: 26 Feb 2009 Posts: 29
|
Posted: Thu Feb 26, 2009 9:36 am Post subject: Undefined symbols when compiling simple file |
|
|
I installed Arclib with DSSS and I wanted to compile this file:
Code: | module ArcTest;
// include input, window, and font to display "hello world"
import
arc.input,
arc.window,
arc.font,
arc.math.point,
arc.draw.color;
/**
* References: http://dmedia.dprogramming.com/?n=Tutorials.ArcIntro
* http://dsource.org/projects/arclib/wiki/Documentation
* */
int main()
{
// Open window with title, screen width, height, and bits per pixel
arc.window.open("Hello World", 400,300,0);
// Open input handling
arc.input.open();
// Open font system
arc.font.open();
// Create a new font with height of 20
Font font = new Font("font.ttf", 20);
// while the user doesn't press the QUIT button
while (!arc.input.keyDown(ARC_QUIT))
{
// process input
arc.input.process();
// clear the current screen
arc.window.clear();
// draw the font in the center of the screen
font.draw("Hello Arc World"c, Point(200,200),Color.Green);
// swap window buffers
arc.window.swap();
}
// close font system
arc.font.close();
// clean ourselves up and exit
arc.window.close();
return 0;
} |
But it says:
Quote: | > "dmd.exe" ArcTest.d
OPTLINK (R) for Win32 Release 8.00.1
Copyright (C) Digital Mars 1989-2004 All rights reserved.
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc6window5clearFZv
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc4math5point5Point6opCallFddZS3arc4math5point5Point
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc4draw5color5Color5GreenS3arc4draw5color5Color
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc6window4swapFZv
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc4font5closeFZv
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc6window5closeFZv
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc6window4openFAaiibbZv
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc5input4openFbZv
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc4font4openFZv
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc4font4Font7__ClassZ
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc4font4Font5_ctorMFAaiZC3arc4font4Font
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc5input7keyDownFiZb
ArcTest.obj(ArcTest)
Error 42: Symbol Undefined _D3arc5input7processFZv
--- errorlevel 13
> Process Exit Code: 13
> Time Taken: 00:14
|
What is wrong?
BTW: Do dmd and DSSS use different include paths because on my first try it didn't found arc.input.d? When I added DSSS's include path to sc.ini it was found, but threw the messages above. Should I put every (newly installed) lib into DSSS's path and clear dmd's for clarity? _________________ A programmer is just a tool to convert coffeine into code! |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
|
Back to top |
|
|
Boscop
Joined: 26 Feb 2009 Posts: 29
|
Posted: Sat Feb 28, 2009 8:11 am Post subject: |
|
|
Thanks! I don't know why I didn't try that. _________________ A programmer is just a tool to convert coffeine into code! |
|
Back to top |
|
|
Boscop
Joined: 26 Feb 2009 Posts: 29
|
Posted: Tue Mar 03, 2009 1:57 pm Post subject: |
|
|
For my new project I want to try the Poseidon IDE. It throws the same errors as above because it doesn't seem to know of dsss. Is there a way to fix these linking errors (recompilation of the libs with some options?) so that the libs can be used also with dmd and bud? _________________ A programmer is just a tool to convert coffeine into code! |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Tue Mar 03, 2009 8:11 pm Post subject: |
|
|
Is there some way to change the 'build' command to be simply 'dsss build' with Poseidon? |
|
Back to top |
|
|
Boscop
Joined: 26 Feb 2009 Posts: 29
|
Posted: Wed Mar 04, 2009 9:23 am Post subject: |
|
|
No, in the options only the paths of dmd, dmc, bud, Res Tool and debugger can be set. On compilation the tools are invoked automatically.
How does dsss compile the libs so that they are not usable with normal dmd compilation? Can't I compile them so that they can be used by both? _________________ A programmer is just a tool to convert coffeine into code! |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Thu Mar 05, 2009 5:08 pm Post subject: |
|
|
DSSS is nice because it allows you to install and uninstall the different libraries easily and you don't have to copy D files to your path to build your project.
With bud, you have to set up your project to have all the project compilation files (D files) in the folder of your project and then bud will pull the source that you need.
With bud, you'd set your project up like
project/
derelict/etc.
arc/etc.
main.d |
|
Back to top |
|
|
Boscop
Joined: 26 Feb 2009 Posts: 29
|
Posted: Tue Mar 10, 2009 2:29 am Post subject: |
|
|
Can't I pass an additional search path so that the same libs are compatible with both? _________________ A programmer is just a tool to convert coffeine into code! |
|
Back to top |
|
|
|