Author Topic: linker to C  (Read 2539 times)

Offline zev

  • Jr. Member
  • *
  • Posts: 3
linker to C
« on: December 25, 2012, 07:32:48 AM »
Has anyone used the NASM compiler at ideone.com? How do you link to gcc in order to use C functions such as printf?

Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: linker to C
« Reply #1 on: December 25, 2012, 05:15:10 PM »
Example from external site: http://www.csee.umbc.edu/portal/help/nasm/sample.shtml#printf1

Google search term to find this example: nasm gcc

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2376
  • Country: us
Re: linker to C
« Reply #2 on: December 25, 2012, 08:38:37 PM »
As I understand it, Zev wants to use this http://ideone.com/ creature. Seems very cryptic to me. They have a Nasm example but I couldn't figure out how to "do" anything with it (or "why"). I think you're going to have to ask around over there, Zed. I don't think we're going to be able to help you much. Post the answer if/when you find it so that we can all learn!

Best,
Frank


Offline Mathi

  • Jr. Member
  • *
  • Posts: 79
  • Country: in
    • Win32NASM
Re: linker to C
« Reply #3 on: December 26, 2012, 03:15:35 AM »
I tried that by choosing the Assembler language in the language listbox. It seems it doesn't try linking with c libraries.
And, there is no way to specify that too. But just int 0x80 calls work.
But the other Assembler option (which uses GAS) , can link to c library , so it uses printf, scanf etc.

Yes.. send a mail to their support team- contact@ideone.com

Thanks,
Mathi.