473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 3279
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
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
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
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
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
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
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
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
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
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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...

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.