Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Linking assembler file with C++


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: May 14, 2016 11:08 AM Last Post By: Charles Bond Threads: [ Previous | Next ]
Charles Bond

Posts: 3
Registered: 5/15/97
Linking assembler file with C++  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 1, 2016 10:16 AM
I have thousands of lines of TASM32 assembler code I'm trying to rebuild with Seattle 10, C++Builder. All files linked fine with previous versions of C++Builder, but fail with linker errors (symbol not found) and indicate that underscores are the problem. I've reduced the problem to the simplest possible form with one VCL Form containing a Button and Label, and an assembler file with one function which just adds two numbers and returns the result. There are only two places in the form where the function name is mentioned and two in the assembler file. But no matter what combination of underscores or no underscores I try, they won't pass the linker. It builds with no complaints in earlier versions of C++Builder, so I expect a rule change occurred somewhere along the line.

Can someone point me to a simple example file for linking a TASM32 assembler file with C++Builder? --or explain exactly what the assembler, linker and compiler expect from external assembler files? I could post the code in the Attachments section, but the situation is so simple it shouldn't be necessary.
Charles Bond

Posts: 3
Registered: 5/15/97
Re: Linking assembler file with C++  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 14, 2016 11:05 AM   in response to: Charles Bond in response to: Charles Bond
Charles Bond wrote:
I have thousands of lines of TASM32 assembler code I'm trying to rebuild with Seattle 10, C++Builder. All files linked fine with previous versions of C++Builder, but fail with linker errors (symbol not found) and indicate that underscores are the problem. I've reduced the problem to the simplest possible form with one VCL Form containing a Button and Label, and an assembler file with one function which just adds two numbers and returns the result. There are only two places in the form where the function name is mentioned and two in the assembler file. But no matter what combination of underscores or no underscores I try, they won't pass the linker. It builds with no complaints in earlier versions of C++Builder, so I expect a rule change occurred somewhere along the line.

Can someone point me to a simple example file for linking a TASM32 assembler file with C++Builder? --or explain exactly what the assembler, linker and compiler expect from external assembler files? I could post the code in the Attachments section, but the situation is so simple it shouldn't be necessary.

I'm guessing that there aren't many C++Builder users who code in assembler, so I expect to continue waiting for a response. As an experiment, I rewrote the minimal assembler file with NASM syntax, assembled it with NASM and linked the object file with the C++Builder project. It worked fine. No warnings, complaints, errors or squeeks. NASM uses underscores on globals or publics but the same strategy on TASM32 files just keeps failing to pass the linker.

I use assembler for its support of the Streaming Extensions (although I still don't know what level TASM32 supports), and still hope someone knows what the solution to linking TASM32 assembler files requires. Am I posting in the wrong forum?

Edited by: Charles Bond on May 14, 2016 11:07 AM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02