Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Somehow creating a 64bit DLL with Borland C++ Builder?

Posted on 2012-04-03
4
Medium Priority
?
967 Views
Last Modified: 2012-08-02
I've created a 32bit DLL in Borland C++ Builder XE2 no problem.

I was tasked to create a 64bit version as well. After researching the "hows" I came to know that Builder does not yet support 64bit compilations.

After some digging around it looked as though the only way to do this ( or any kind of 64bit compiling) was to use visual studio express command lines. Thus I tried the following commands to try to compile:

CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.Cmd" /x64
"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64\cl.exe" -IC:\projects\dll -I"C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\include\windows\vcl" -I"C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\include\windows\rtl" -MD -LD C:\projects\dll\dll.cpp -FeMyDLL.dll

Open in new window


Running the above gives me the following error:

C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\include\windows\rtl\sysmac.h(162) : fatal error C1189: #error : "System.hpp/sysmac.h and related headers need __declspec(uuid(..)) and __uuidof support"

Open in new window


Mucking about on Google only gave me some posts on adding #define DECLSPEC_UUID(guid) which doesn't help at all.

So my question is, has anyone ever successfully compiled a borland c++ project (or an application / dll created in borland) for 64 bit (plus a step-by-step on how)? Or if anyone can help with the above error message, it would be greatly appreciated.

--
Hein.
0
Comment
Question by:ilanazbel
3 Comments
 
LVL 21

Expert Comment

by:developmentguru
ID: 37821554
I found a hint for you in the RAD Studio XE2 help.  Bring up the help and place this in the URL:

ms-help://embarcadero.rs_xe2/rad/The_declspec_Keyword_Extension.html

Towards the bottom it gives an explanation of the declspec as it applies to using a GUID with a COM style object being defined in a DLL.  

If you need to define one, just hit [Ctrl][Shift][G] and it will create the statement for you.  Placing this near the top of your project file should give you the ID it is looking for.

I post this as an attempt to help you out.  I use Delphi XE2 as the syntax is FAR more readable than the C++ is.  Having stated that, it has been many years since I compiled anything in C++, so I cannot give you a step by step.
0
 

Accepted Solution

by:
ilanazbel earned 0 total points
ID: 37841273
There is no answer to this question. After being in touch with borland themselves it seems as though 64 bit support *might* only be supported in c++ from XE3.
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 38249579
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Simple Linear Regression

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question