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

Compile errors for simple Hello World
Goto page Previous  1, 2
 
Post new topic   Reply to topic     Forum Index -> Tioport
View previous topic :: View next topic  
Author Message
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Sun Apr 15, 2007 9:45 am    Post subject: Reply with quote

You use an up to date checkout from SVN?

Your command line looks like you copied the sources of SWT/Dejavu to one folder. In the checkout folder src/dejavu there is also a util folder with 2 modules, that the linker is missing.
http://www.dsource.org/projects/tioport/browser/trunk/src/dejavu

What i don't understand is, why rebuild did a successful compile, while these modules are missing. Hm perhaps you can recheck?
Back to top
View user's profile Send private message
doob



Joined: 06 Jan 2007
Posts: 367

PostPosted: Mon Apr 16, 2007 12:09 pm    Post subject: Reply with quote

I have now(earlier to day) downloaded the dmd release with tango and a new rebuild release, and did a svn checkout. I have the dejavu and util folder with the sources, the org folder with the .di files from the deploy/include folder, the five .lib files and StaticCtorsSwt.di and StaticCtorsDejavu.d. I have tried both with rebuild and build and getting the same errors. I have all the folders and files in the same folder as the main.d file and the folder I'm building in.

main.d:
Code:
module main;

pragma(lib, "swt-awt-win32-3235.lib");
pragma(lib, "swt-gdip-win32-3235.lib");
pragma(lib, "swt-wgl-win32-3235.lib");
pragma(lib, "swt-win32-3235.lib");

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import dejavu.lang.String;

import StaticCtorsSwt;

// dummy function to access compiled in resources (here we do not use this feature)
extern(C) ubyte[] resources_getDataById( char[] aId ){
    return null;
}

void main(char[][] args) {
    // initialize SWT
    StaticCtorsSwt.callAllStaticCtors();

    Display display = new Display();
    Shell shell = new Shell(display);

    shell.setText(String.fromUtf8("Hello, world!"));
    shell.open();

    while (!shell.isDisposed()) {
        if (!display.readAndDispatch()) {
            display.sleep();
        }
    }

    display.dispose();
}


build:
Code:
build -clean -gui -LIBPATH=tioport-swt-3.2.1-win32.lib main.d


rebuild:
Code:
rebuild -dc=dmd-win-tango -clean -rfmain.rf main.d


main.rf:
Code:
-oqobj
-ofmain.exe
-ll"swt-wgl-win32-3235"
-ll"tioport-swt-3.2.1-win32.lib"
-ll"swt-awt-win32-3235"
-ll"swt-gdip-win32-3235"
-ll"swt-win32-3235"


When I use rebuild I comment out the pragma rows trying two have the same as the paint example

The output:
Code:
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

main.obj(main)
 Error 42: Symbol Undefined _D14StaticCtorsSwt18callAllStaticCtorsFZv
main.obj(main)
 Error 42: Symbol Undefined _D3org7eclipse3swt7widgets7Display7Display7__ClassZ
main.obj(main)
 Error 42: Symbol Undefined _D3org7eclipse3swt7widgets7Display7Display5_ctorMFZC
3org7eclipse3swt7widgets7Display7Display
main.obj(main)
 Error 42: Symbol Undefined _D3org7eclipse3swt7widgets5Shell5Shell7__ClassZ
main.obj(main)
 Error 42: Symbol Undefined _D3org7eclipse3swt7widgets5Shell5Shell5_ctorMFC3org7
eclipse3swt7widgets7Display7DisplayZC3org7eclipse3swt7widgets5Shell5Shell
Back to top
View user's profile Send private message
keinfarbton



Joined: 03 Dec 2005
Posts: 224
Location: Stuttgart - Germany

PostPosted: Mon Apr 16, 2007 12:19 pm    Post subject: Reply with quote

hm, best starting point is probably an already know to work example.
In case of windows, this is the paint example. Did you already have tried this?

I really would like to help you more over IRC. Is it possible for you to join #D at freenode and contact me (keinfarbton) ?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Tioport All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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