473,503 Members | 3,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

linking asm and c procedures

R
hello.

I've got problem with linking asm and c procedures.

I've got main.c where i've got my external definitions:

extern int buffer(int,int,int); // coded in asm
extern int hash(int,int); //coded in asm

I've got simple make file for my project:

BC=c:\bc5
BCBIN=c:\bc5\bin
proj.exe: main.obj buffer.obj
$(BCBIN)\tlink32 -L$(BC)\lib c0x32.obj $**, proj.exe, ,import32.lib +
cw32.lib
main.obj: main.c
$(BCBIN)\bcc32 -c main.c
buffer.obj: buffer.asm
$(BCBIN)\tasm /ml buffer.asm

Both buffer.obj and main.obj are created but when i try link them using
tlink32 i get:

MAKE Version 5.0 Copyright (c) 1987, 1997 Borland International
c:\bc5\bin\tlink32 -m -Lc:\bc5\lib c0x32.obj main.obj buffer.obj ,
proj.exe, ,import32.lib + cw32.lib
Turbo Link Version 2.0.68.0 Copyright (c) 1993,1997 Borland International
Error: Unresolved external '__ExceptInit' referenced from module c0nt.ASM
Error: Unresolved external '__startup' referenced from module c0nt.ASM
Error: Unresolved external '__GetExceptDLLinfoInternal' referenced from
module c0nt.ASM
Error: Unresolved external '_printf' referenced from module main.c
Error: Unresolved external '_getch' referenced from module main.c
Error: Unresolved external '_exit' referenced from module main.c
Error: Unresolved external '__matherr' referenced from module c0nt.ASM
Error: Unresolved external '__matherrl' referenced from module c0nt.ASM
Error: Unresolved external '__fmode' referenced from module c0nt.ASM
Error: Unresolved external '__setargv__' referenced from module c0nt.ASM
Error: Unresolved external '__setenvp__' referenced from module c0nt.ASM
** error 2 ** deleting proj.exe

the problem is only when i try to link both OBJ files.

what am i doing wrong?

maybe i should include more libs? i use only: c0x32.obj, import32.lib and
cw32.lib

thanks in advance
best regards R

Nov 14 '05 #1
1 3283
R <ruthless@@@poczta.onet.pl> scribbled the following:
hello. I've got problem with linking asm and c procedures. I've got main.c where i've got my external definitions: extern int buffer(int,int,int); // coded in asm
extern int hash(int,int); //coded in asm I've got simple make file for my project: BC=c:\bc5
BCBIN=c:\bc5\bin
proj.exe: main.obj buffer.obj
$(BCBIN)\tlink32 -L$(BC)\lib c0x32.obj $**, proj.exe, ,import32.lib +
cw32.lib
main.obj: main.c
$(BCBIN)\bcc32 -c main.c
buffer.obj: buffer.asm
$(BCBIN)\tasm /ml buffer.asm Both buffer.obj and main.obj are created but when i try link them using
tlink32 i get: MAKE Version 5.0 Copyright (c) 1987, 1997 Borland International
c:\bc5\bin\tlink32 -m -Lc:\bc5\lib c0x32.obj main.obj buffer.obj ,
proj.exe, ,import32.lib + cw32.lib
Turbo Link Version 2.0.68.0 Copyright (c) 1993,1997 Borland International
Error: Unresolved external '__ExceptInit' referenced from module c0nt.ASM
Error: Unresolved external '__startup' referenced from module c0nt.ASM
Error: Unresolved external '__GetExceptDLLinfoInternal' referenced from
module c0nt.ASM
Error: Unresolved external '_printf' referenced from module main.c
Error: Unresolved external '_getch' referenced from module main.c
Error: Unresolved external '_exit' referenced from module main.c
Error: Unresolved external '__matherr' referenced from module c0nt.ASM
Error: Unresolved external '__matherrl' referenced from module c0nt.ASM
Error: Unresolved external '__fmode' referenced from module c0nt.ASM
Error: Unresolved external '__setargv__' referenced from module c0nt.ASM
Error: Unresolved external '__setenvp__' referenced from module c0nt.ASM
** error 2 ** deleting proj.exe the problem is only when i try to link both OBJ files. what am i doing wrong? maybe i should include more libs? i use only: c0x32.obj, import32.lib and
cw32.lib


Your question is about your compiler, not about the C language. Please
ask in a Borland newsgroup.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"This isn't right. This isn't even wrong."
- Wolfgang Pauli
Nov 14 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
8376
by: m.ramana | last post by:
Two SQL Servers 1) "Test" Payroll DB Transaction Table pr_SubmitTransaction in Payroll DB ******************************************** 2) "Production" Payroll DB Transaction Table...
20
3197
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external...
5
4512
by: Jeff | last post by:
I have question about differences in fenced sql procedures and fenced stored procedures. Do fenced sql procedures take up an extra memory segment when executed? Reason I ask is we have several...
0
2213
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
2
4126
by: Matthew Wells | last post by:
Good morning... I have an Access front end that uses SQL Server linked tables. SQL Server uses Windows authentication. I have one Windows group that all Access users are a member of. I added...
5
3456
by: Tim Marshall | last post by:
I was following the thread "Re: Access Treeview - Is it Safe Yet?" with interest and on reading the post describing Lauren Quantrell's SmartTree, I've run into something I don't understand: Stored...
2
2336
by: Quinnie | last post by:
Hi, I have a homework assignment that I'm so confused and really need help with. Here's the description, any help would be appreciated. Thanks! Assume we have a statically-scoped language...
1
520
by: R | last post by:
hello. I've got problem with linking asm and c procedures. I've got main.c where i've got my external definitions: extern int buffer(int,int,int); // coded in asm extern int hash(int,int);...
6
4705
by: heyvinay | last post by:
I have transaction table where the rows entered into the transaction can come a result of changes that take place if four different tables. So the situation is as follows: Transaction Table...
0
7261
Oralloy
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,...
0
7315
jinu1996
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...
1
6974
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7445
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5559
agi2029
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,...
1
4991
isladogs
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...
0
4665
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...
0
1492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
369
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.