Thread: Need ASM to make BF compiler...

  1. #16
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    Try this:
    GoRC /o icon.rc
    tcc -c -o helloworld.o helloworld.c
    tcc -o helloworld icon.o helloworld.o
    EDIT: It looks like you tried linking with the output from something like
    tcc helloworld.c
    which would be an executable instead of an .o object file. You might also try doing 'tcc -c helloworld.c' and then linking with the the go linker like 'golink helloworld.o icon.obj'.

    ANOTHER EDIT: Isn't C just awesomely fun?
    Last edited by bernt; 03-31-2010 at 06:05 PM.
    Consider this post signed

  2. #17
    Registered User
    Join Date
    Jan 2008
    Posts
    244
    i'll try that.
    thanks

  3. #18
    Registered User
    Join Date
    Jan 2008
    Posts
    244
    umh... it's still producing garbade exe files. look:

    http://xload.dev-ch.de/file.php?id=fa48188e6f1823

  4. #19
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    OK, terribly sorry. Put helloworld.o last in the list of objects for golink, ie,
    Code:
    golink icon.obj helloworld.o
    I haven't manually linked resource files for a long time (MSVC handles this automatically) but the order apparently matters when linking.

    By the way I downloaded your program and it's wonderful, but I have a little UI suggestion: get rid of that pause after the program executes; I thought the compiler was stuck in a loop the first time I did this:
    Code:
    >compiler
    Commandline expected
    _
    The program ought to exit right away in the final product. But good job nonetheless!
    Consider this post signed

  5. #20
    Registered User
    Join Date
    Jan 2008
    Posts
    244
    thanks.
    but "golink icon.obj helloworld.o" somehow does the same thing and isn't working either.
    both files are about 5-6 KB and the final product also is about that size.... somethings wrong.

    btw: upload link has changed for anyone, who wants to download it: http://xload.dev-ch.de/file.php?id=716ddfc9b16d0ded

  6. #21
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    but "golink icon.obj helloworld.o" somehow does the same thing and isn't working either.
    CURSES! I guess I don't know any more to do.

    EDIT: I think it worked for me because I did it (the resource compiling) once with MinGW's windres.exe and never bothered to clean out the files to test it with gorc :/. I've now concluded that gorc is trash; I've uploaded just windres.exe binary here, and a screenshot of its usage here. GNU saves the day again.

    And this has been incredibly frustrating for me too.
    Consider this post signed

  7. #22
    Registered User
    Join Date
    Jan 2008
    Posts
    244
    WOW! Working!!!

    thank you so much

    Edit: here is my working compiler!!

    http://xload.dev-ch.de/file.php?id=1768ed74d29c6f49
    bfpp 1.0.0.zip

    with examples and "stdio.bf" lol
    Last edited by Devils Child; 04-06-2010 at 09:20 AM.

  8. #23
    Just a pushpin. bernt's Avatar
    Join Date
    May 2009
    Posts
    426
    WOW! Working!!!
    I'm glad I could finally get something to work. Thanks for your patience.
    Consider this post signed

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 04:04 AM
  2. Win32 Common Controls in C++, how do i make and use them?
    By C+noob in forum Windows Programming
    Replies: 6
    Last Post: 01-09-2006, 11:53 AM
  3. Compiler Design... Anyone That Can Help!
    By ComputerNerd888 in forum C++ Programming
    Replies: 3
    Last Post: 09-27-2003, 09:48 AM
  4. help me about make a compiler
    By Sither in forum C Programming
    Replies: 2
    Last Post: 09-09-2003, 02:40 AM
  5. Visual Basic compiler or whatever used to make vb progs...
    By Xmevs in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 05-22-2002, 03:01 AM