Hello Newsgroup,
I had program a little tool, thats output some assembler output:
---
.section .rdata, "dr"
LC1:
.ascii "eins: %g\0"
..text
..globl _dbase_main
_dbase_main:
pushl %ebp
movl %esp, %ebp
fldz
fstpl _f
fldl _bmodal
fstpl 4(%esp)
movl $LC1
call _printf
leave
ret
..comm _bmodal, 16 # 8
..comm _f, 16 # 8
---
the compilation into object file is working fine.
But how can I link the .o file to a working .exe
file?
It should be able to link to DOS/GUI (win32) exe.
Thanks for helping
Jens 2 2063
"Jens Kallup" <jk*****@web.de wrote in message n
>
I had program a little tool, thats output some assembler output:
---
.section .rdata, "dr"
LC1:
.ascii "eins: %g\0"
.text
.globl _dbase_main
_dbase_main:
pushl %ebp
movl %esp, %ebp
fldz
fstpl _f
fldl _bmodal
fstpl 4(%esp)
movl $LC1
call _printf
leave
ret
.comm _bmodal, 16 # 8
.comm _f, 16 # 8
---
the compilation into object file is working fine.
But how can I link the .o file to a working .exe
file?
It should be able to link to DOS/GUI (win32) exe.
We don't deal with platform -specific matters here, nor assembler.
However object or .o / .obj files are a common intermediate. If you can coax
an assembler into producing a conforming .o file then you ought to be able
to link it to other C-derived .o files using the linker. However you are
unlikely to be able to link it in to an executable file.
Jens Kallup wrote, On 11/02/07 16:42:
Hello Newsgroup,
I had program a little tool, thats output some assembler output:
<snip>
the compilation into object file is working fine.
But how can I link the .o file to a working .exe
file?
It should be able to link to DOS/GUI (win32) exe.
Using whatever linker came with your compiler. This has nothing to do
with the C programming language and everything to do with your tool set.
Read the instructions for your tools and ask in whatever groups and
mailing lists exist to support them.
--
Flash Gordon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Christos TZOTZIOY Georgiou |
last post by:
Last night I was compiling the latest python snapshot at my home Linux
system (a K6-III @420 --the extra 20 Hz is overclocking :); then I tried
building a shared version of the interpreter. I did some speed
comparisons, and pystone reported ~6090 pystones for the shared and
~7680 pystones for the (default) static build.
This is quite a difference, and while I do know what impact position
independent code has on libraries, this was the...
|
by: Pankaj Bhagat |
last post by:
Hi,
This is in context with compiler and linker
Can someone let me know
1) what is a binder? where is it needed? What does it do in a
compiling process?
-----------------
2) When I have a g++ on linux, does the g++ or gcc have the linker and
binder inbuilt in it?
|
by: Claudio Neri |
last post by:
Hi everybody, I'm Claudio from Rome.
I'm developying in Cfor univeristy and I have to transfrm a *nix chat
server to a win chat server.
I tryed to change the incudes at the top of the source and the I compiled
all.
Cpompiled with no errors but then it could'nt create the exe file. Maybe
there is an error with the linker.
Can you help me?
If you want I could send you the exact message of the linker
|
by: Steve Baer |
last post by:
I recently read your whitepaper under the "extremely long link times" post
and have a question that I was hoping you could answer.
My question is based on the following paragraph:
Directives
The linker's handling of directives left something to be desired in VC2003,
and for this reason code with lots of directives can suffer. In particular
__declspec(export), as it's likely the most common linker directive.
Besides that, don't export...
|
by: Gustavo L. Fabro |
last post by:
Greetings!
I'm a newbie in Visual C++ .NET (have programmed in Borland C++
and Builder for long) and I am trying to do a very simple thing,
but I'm stuck.
I created an (unmanaged) DLL project with a sample function, and
tried to call it from a ".NET Forms" project. All I get are
"Unresolved External" errors from the Linker!
| |
by: quortex |
last post by:
Hi all,
I have a class which contains a method called GetMessage(). When I
compile and unit test it all is well.
However in the application I want to use it in there appears to be a
conflict with Windows.h. I receive the following error:
Error 1 error LNK2001: unresolved external symbol "public: class
Messaging::Native::IMessage * __thiscall
|
by: mshngo |
last post by:
Hi,
I am having the following trouble in compiling DLL on windows. Suppose
I want to compile module A into a DLL library, and I want to declare an
external interger n in A. My intention is to have n actually defined in
another module B, and I want to compile B into an executable, which
will dynamically load module A at run-time. Such reference can then be
resolved when B loads A. Is there a way to achieve this? Right now when
I tried...
|
by: ulillillia |
last post by:
I've been following the tutorial here to learn Windows programming (along
with the help file from the Windows Platform SDK):
http://www.cprogramming.com/tutorial/opengl_windows_programming.html
and when I try compiling the code given in this tutorial (even using copy
paste instead of manually typing it), I keep getting errors that prevent me
from compiling it. At first, it was because windows.h couldn't be found, but
that issue was...
|
by: Oneironaut |
last post by:
Hello friends,
I have an issue with a linker warning. It is the warning LNK4089. I am
working in MSVC6.0
I investigated and this warning tells that the import of the library
to which it makes reference is redundant, thus the linker ignores that
library in order to make the code smaller. As it is expected, it only
appears for release versions.
|
by: shailesh333 |
last post by:
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
#include <Winsock2.h>
#include <stdlib.h>
#define PORTNUM 2343
int main(int argc, char *argv)
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |