473,382 Members | 1,423 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,382 software developers and data experts.

error linking c++ and asm

i want to call a procedure from asm but when i want to link my program it show some error
like de _cout procedure doesn't exist and _printf and others =/.....
i think that maybe the obj of my program in c++ its not right but how i make it!! i use borland c++ 4.5
Nov 30 '10 #1

✓ answered by Raj K

- From the assembly you need to call mangled name instead of the name that appears in C++ code.
- Different compilers use different strategies for name mangling.
- Here is name mangling described. This article uses g++ as compiler. You need to explore your compiler behavior for the same.
Here is the link -
http://avabodh.com/cxxin/namemangling.html

- If the link error is due to your C++ code, then look for extern keyword, it might help

3 2102
Banfa
9,065 Expert Mod 8TB
C++ uses name mangling, that is the function name os not the actual name you give it, which is required to support function overloading.

If you want to call an assembler function or call a function from an assembly routine then you are better off declaring it as a C function. C does not use name mangling (and does not support function overloading) and so it is easier to translate the name correctly for the assembly code.

Normally the name in assembly is the same as the name in C with a prepended _
Nov 30 '10 #2
Raj K
9
- From the assembly you need to call mangled name instead of the name that appears in C++ code.
- Different compilers use different strategies for name mangling.
- Here is name mangling described. This article uses g++ as compiler. You need to explore your compiler behavior for the same.
Here is the link -
http://avabodh.com/cxxin/namemangling.html

- If the link error is due to your C++ code, then look for extern keyword, it might help
Dec 8 '10 #3
thanks, but i did'nt work, it was the same that i had done ='( i'll try with the g++ compiler like you said
Dec 15 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Hesam Shamshiri | last post by:
I am having a problem linking an oci 7 application with oracle9i on AIX 4.3. The makefile has the following line: -L/home/oracle/product/9.0.1/lib -lclntsh This was working in oracle 8,...
2
by: Michael | last post by:
High there everyone, I have inherited a database with an odbc table (linking to an oracle database) , we have recently updated our operating environment to windows 2000 (access 2000). since...
0
by: rivka.howley | last post by:
I'm using Access 2003 and Excel 2003. I can link or import an Excel table fine through the menu. But when I do this through code I get an error: "Run time error 3170. Could not find installable...
7
by: wmkew | last post by:
Hello everyone I'm encountering a R6002 Runtime error and several bugs when trying to generate a simple Managed C++ application with .NET 2003. The main problem seems to arise from linking with...
2
by: Jim Crate | last post by:
I'm trying to build a client program to access a database using the libpq interface on MacOS X 10.3.3 using CodeWarrior 9. PostgreSQL is at version 7.4.2. It compiles ok, but I get a link...
1
by: gopinathanr | last post by:
I am having a VB 6.0 program where I am using an MS Access database. This database has some tables that have been created by linking to MySql database using the MySQL ODBC 3.51 Driver. When I try...
1
by: gopinathanr | last post by:
I am having a VB 6.0 program where I am using an MS Access database. This database has some tables that have been created by linking to MySql database using the MySQL ODBC 3.51 Driver. When I try...
4
by: Jayhawk | last post by:
Hello, I am trying to use a MS Access front end application to link to data tables stored in MySQL Server. I am running MySQL 5.0 Community Server, MySQL Connector/ODBC 3.51, and MS Access...
7
by: colintis | last post by:
Hi guys, Recently I need to dig up an "ancient" paradox (.db) file connected by an access database. But when I select the paradox file as link table it shows the following error: Unexpected...
2
by: nipun sabharwal | last post by:
void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"c:\\tc\\bgi"); setcolor(GREEN); settextstyle(4,0,8); outtextxy(200,50,"TIME"); setcolor(YELLOW); settextstyle(4,0,8);...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.